001/* 002 * (C) Copyright 2018 Nuxeo (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Funsho David 018 */ 019 020package org.nuxeo.ecm.platform.comment.api; 021 022import java.time.Instant; 023import java.util.Collection; 024 025/** 026 * Comment interface. 027 * 028 * @since 10.3 029 */ 030public interface Comment { 031 032 /** 033 * Gets comment id. 034 * 035 * @return the id 036 */ 037 String getId(); 038 039 /** 040 * Sets comment id. 041 * 042 * @param id the id 043 */ 044 void setId(String id); 045 046 /** 047 * Gets parent id. 048 * 049 * @return the parent id 050 */ 051 String getParentId(); 052 053 /** 054 * Sets parent id. 055 * 056 * @param parentId the parent id 057 */ 058 void setParentId(String parentId); 059 060 /** 061 * Gets the list of ancestor ids. 062 * 063 * @return the list of ancestor ids 064 */ 065 Collection<String> getAncestorIds(); 066 067 /** 068 * Adds an ancestor id. 069 * 070 * @param ancestorId the ancestor id 071 */ 072 void addAncestorId(String ancestorId); 073 074 /** 075 * Gets comment author. 076 * 077 * @return the author 078 */ 079 String getAuthor(); 080 081 /** 082 * Sets comment author. 083 * 084 * @param author the author 085 */ 086 void setAuthor(String author); 087 088 /** 089 * Gets comment text. 090 * 091 * @return the text 092 */ 093 String getText(); 094 095 /** 096 * Sets comment text. 097 * 098 * @param text the text 099 */ 100 void setText(String text); 101 102 /** 103 * Gets comment creation date. 104 * 105 * @return the creation date 106 */ 107 Instant getCreationDate(); 108 109 /** 110 * Sets comment creation date. 111 * 112 * @param creationDate the creation date 113 */ 114 void setCreationDate(Instant creationDate); 115 116 /** 117 * Sets comment modification date. 118 * 119 * @return the modification date 120 */ 121 Instant getModificationDate(); 122 123 /** 124 * Sets comment modification date. 125 * 126 * @param modificationDate the modification date 127 */ 128 void setModificationDate(Instant modificationDate); 129}