com.jalios.jcms
Class Publication

java.lang.Object
  extended by com.jalios.jstore.BasicStorable
      extended by com.jalios.jcms.Data
          extended by com.jalios.jcms.Publication
All Implemented Interfaces:
EditableData, JcmsConstants, ImportConstants, MashupConstants, Searchable, Storable, JaliosConstants, TreeNode, Cloneable, Comparable<BasicStorable>
Direct Known Subclasses:
Content, Form, PortalElement, UserContent

public abstract class Publication
extends Data
implements ImportConstants, EditableData, Searchable, TreeNode

This abstract class is the super class of all the Publication classes.

Version:
$Revision: 30556 $
Author:
Olivier Dedieu

Nested Class Summary
static class Publication.AdateComparator<T extends Publication>
          Compares two Publications using their Adate in descending order (newest date first).
static class Publication.AdateSelector
          AdateSelector selects all the publications with a adate in a given range
static class Publication.AudienceRightComparator<T extends Publication>
          Comparator to compare Publication using their audience rights.
static class Publication.AudienceRightSelector
          AudienceRightSelector selects all publications being audienced.
static class Publication.AuthorComparator<T extends Publication>
           
static class Publication.AuthorizedSelector
          AuthorizedSelector selects all the publications a member is authorized to read.
static class Publication.CanWorkOnSelector
          CanWorkOnSelector selects all the publications a member can work on.
static class Publication.DdateComparator<T extends Publication>
          Compares two Publications using their Ddate in descending order (newest date first).
static class Publication.EdateComparator<T extends Publication>
          Compares two Publications using their Edate in descending order (newest date first).
static class Publication.EdateSelector
          EdateSelector selects all the publications with a edate in a given range
static class Publication.PdateComparator<T extends Publication>
          Compares two Publications using their Pdate in descending order (newest date first).
static class Publication.PdateSelector
          PdateSelector selects all the publications with a pdate in a given range
static class Publication.PstatusComparator<T extends Publication>
           
static class Publication.PstatusSelector
          PstatusSelector selects all the publications with a given pstatus.
static class Publication.RatingComparator<T extends Publication>
           
static class Publication.ReaderComparator<T extends Publication>
           
static class Publication.ReadRightSelector
          ReadRightSelector selects all publications which have any read right.
static class Publication.ReviewCountComparator<T extends Publication>
           
static class Publication.RightComparator<T extends Publication>
           
static class Publication.SdateComparator<T extends Publication>
          Compares two Publications using their Sdate in descending order (newest date first).
static class Publication.SdateSelector
          SdateSelector select all the publications with a sdate in a given range
static class Publication.TitleComparator<T extends Publication>
           
static class Publication.TrackedSelector
          TrackedSelector selects all the publications which are tracked.
static class Publication.TypeComparator<T extends Publication>
           
static class Publication.UdateComparator<T extends Publication>
          Compares two Publications using their udate in descending order (newest date first).
static class Publication.UdateSelector
          UdateSelector selects all the publications with a udate in a given range
static class Publication.UserContentSelector
          UserContentSelector selects all publications which are UGC (UserContent).
static class Publication.VisibleStateSelector
          VisibleStateSelector selects all the publications which are in a visible state
static class Publication.WorkspaceAuthorSelector
          WorkspaceAuthorSelector selects all the publication the given member is the author and which belong to the given workspace.
static class Publication.WorkspaceComparator<T extends Publication>
           
static class Publication.WorkspaceSelector
          WorkspaceSelector selects all the publications which belong to the given workspace.
 
Nested classes/interfaces inherited from class com.jalios.jcms.Data
Data.AuthorSelector, Data.CdateSelector, Data.DataNameComparator<T extends Data>, Data.DeletableSelector, Data.ImportSelector, Data.MdateSelector, Data.OpAuthorComparator<T extends Data>, Data.RowIdComparator<T extends Data>, Data.StrongLockSelector
 
Nested classes/interfaces inherited from class com.jalios.jstore.BasicStorable
BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable>
 
Field Summary
protected  Date adate
           
protected  Set<String> allCatIdSet
           
protected  Set<String> authGrpIdSet
           
protected  boolean authGrpIdSetDirty
           
protected  boolean authGrpIdSetInit
           
protected  Set<String> authMbrIdSet
           
protected  boolean authMbrIdSetDirty
           
protected  boolean authMbrIdSetInit
           
protected  TreeSet<Group> authorizedGroupSet
           
protected  TreeSet<Member> authorizedMemberSet
           
protected  Category[] categories
           
protected  TreeSet<Category> categorySet
           
protected  Set<String> catIdSet
           
protected  boolean catIdSetDirty
           
protected  boolean catIdSetInit
           
static int CTRL_TOPIC_ADVANCED
           
static int CTRL_TOPIC_CATEGORIES
           
static int CTRL_TOPIC_WORKFLOW
           
protected  Date edate
           
protected  TreeSet<String> friendlyURLSet
           
protected  boolean hasNoReadRightsDBData
           
protected static PublicationIndexManager indexMgr
           
protected  boolean isTracked
           
protected  Publication mainInstance
           
protected  String mainLanguage
           
protected  int majorVersion
           
protected  Date mergeDate
           
protected  String mergeId
           
protected  int minorVersion
           
protected  Date pdate
           
protected  int pstatus
           
protected  int readerCount
           
static String REVISION
           
protected  HashMap<String,TreeSet<Member>> roleMap
           
protected  Date sdate
           
protected  String[] templates
           
protected  String title
           
protected  HashMap<String,String> titleML
           
protected  Date udate
           
protected  TreeSet<Group> updateGroupSet
           
protected  TreeSet<Member> updateMemberSet
           
protected  AlarmEntry wfExpressAlarmEntry
           
protected  AlarmEntry wfReminderAlarmEntry
           
protected  Workspace workspace
           
 
Fields inherited from class com.jalios.jcms.Data
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, lockDate, lockMember, opAuthor, opDelegate
 
Fields inherited from class com.jalios.jstore.BasicStorable
cdate, ddate, id, mdate, store
 
Fields inherited from interface com.jalios.jcms.mashup.ImportConstants
IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_PROP
 
Fields inherited from interface com.jalios.jcms.mashup.MashupConstants
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG
 
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CRYPT_MD5, CRYPT_UNDEFINED, CRYPT_UNIX, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_DEEP_COPY, OP_DEEP_DELETE, OP_DELETE, OP_MERGE, OP_UPDATE, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
Constructor Summary
Publication()
           
Publication(Publication other)
           
 
Method Summary
 void addAuthorizedGroup(Group grp)
          Add an authorized group
 void addAuthorizedMember(Member mbr)
          Add an authorized member.
 void addCategory(Category cat)
          Add the given category to the categories of this publication
 void addFollower(Member mbr)
          Adds a follower for this publication.
 void addWeakReferrer(Publication referrer)
          Add a weak referrer.
 void addWFExpressAlarm()
          Adds a WFExpress alarm for this publication (only for main leader replica).
 void addWFReminderAlarm()
          Adds a WFReminder alarm for this publication (only for main leader replica).
 void assignCommonPublicationFields(Publication pub)
          Assign all the common fields (author, workspace, pstatus, pdate, ...) of this publication from the given one.
 void assignRole(String roleId, Member mbr)
          Assigns a member to a role
 void assignRole(String roleId, TreeSet<Member> mbrSet)
           
 boolean canBeArchived(Member mbr)
          Check if the publication can be archived by the given member.
 ControllerStatus canBeArchived(Member mbr, Map context)
          Returns a ControllerStatus indicating if this publication can be archived or not
 boolean canBeEditedFieldByField(Member mbr)
          Returns true if this publication can be edited field by field on the front-office by the given member.
 boolean canBeFollowedBy(Member mbr)
          Returns true if the given member can follow this publication
 boolean canBeReadBy(Group group)
          Checks if a group can read this publication.
 boolean canBeReadBy(Member member)
          This convenient method is the same that canBeReadBy(member, true).
 boolean canBeReadBy(Member member, boolean searchInGroups)
          Check if a member can read this publication.
 boolean canCreateCopy(Member mbr)
          Returns true if the given member can create a copy of this publication
 boolean canCreateCopy(Member mbr, boolean isWorkCopy)
          Returns true if the given member can create a copy of this publication
 boolean canCreateWorkCopy(Member mbr)
          Returns true if the given member can create a work copy of this publication
 boolean canMergeWorkCopy(Member mbr)
          Returns true if the given member can merge this work copy with it's main instance
 ControllerStatus checkCreate(Member mbr, Map context)
          Checks if the creation can be performed
 ControllerStatus checkDelete(Member mbr, Map context)
          Checks if the deletion can be performed
 ControllerStatus checkIntegrity()
          Checks whether or not data integrity constraints are respected.
 boolean checkLang(String lang)
          Check if the publication is available for the given language.
 ControllerStatus checkMember(int op, Member mbr, Map context)
          Checks if the given member can perform the given operation.
 ControllerStatus checkMerge(Member mbr, Map context)
          Checks if the merge can be performed
 Object[] checkStateChange(Member mbr, int newPstatus)
          Checks if the state change can be performed (it checks if the transition's rule can be perfomed)
 Object[] checkStateChange(Member mbr, int newPstatus, int oldPstatus)
          Checks if the state change can be performed (it checks if the transition's rule can be perfomed)
protected static boolean checkTemplateEntry(TypeTemplateEntry tte, String usage, boolean devModeChecks, String label)
          Checks if the given TypeTemplateEntry is matching dev modes In developpement mode it throws exception if template is null or jsp is missing In production mode it returns default template if template is null but do not check if JSP template exists to improve performances.
 ControllerStatus checkUpdate(Member mbr, Map context)
          Checks if the update can be performed
 ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, Map context)
          Checks if the given write operation can be performed
 void clearTransientIndex()
          Clear all the transient fields that contains indexes.
 void cloneDBDataCollections()
           
 String computeSignature()
          Deprecated. use #computeSignature(boolean, boolean)
 String computeSignature(boolean includePublicationFields, boolean hash)
          Compute the signature of this publication.
 boolean containsCategory(Category category)
          This convenient method returns true if the publication contains a given category.
 Publication createCopy(Member mbr)
          Creates a copy from this publication
 boolean createWFNote(Member mbr, int newPstatus, int oldPstatus, String note)
          Create/Update a WFNote and check if the transition can be performed.
 boolean createWFNote(Member mbr, int newPstatus, String note)
          Create/Update a WFNote and check if the transition can be performed.
 Publication createWorkCopy(Member mbr)
          Creates a work copy for this publication
 void exportXmlField(StringBuffer sb, int indentLevel)
          Fills the given StringBuffer with Xml export of fields of this data.
 String getAbstract()
          Returns the abstract of this publication in the channel's main language.
 String getAbstract(String lang)
          Returns the abstract of this publication.
 String getAbstract(String lang, boolean useDefault)
          Returns the abstract of this publication.
 HashMap<String,String> getAbstractML()
          Returns the map containing abstracts of this publication in all language but the channel's main language.
 int getAccessCount()
           
 Date getAdate()
          Retrieve the archiving date of this publication.
static
<T extends Publication>
Comparator<T>
getAdateComparator()
           
static Publication.AdateSelector getAdateSelector(Date begin, Date end)
           
 Set<String> getAllCatIdSet()
          Do not call this method.
 Set<String> getAllFilePath()
          Gives the set of all relatives path to all kind (image, media, file) of files linked from the given publication.
 String getAllWikiText()
          Returns a String which contains the concatenation of all the wiki fields.
 String getAllWysiwygText()
          Returns a String which contains the concatenation of all the wysiwyg fields.
 String getAudiencedRightsString(String userLang, int max)
          This convenient method returns a String displaying categories used by audience right (eg if this publication is restricted to member, g2, m1, m2 and m3, getReadRightsString(3) will return "g1, g2, m1, ...")
static
<T extends Publication>
Comparator<T>
getAudienceRightComparator()
           
static Publication.AudienceRightSelector getAudienceRightSelector()
           
 Set<String> getAuthGrpIdSet()
          Do not call this method.
 Set<String> getAuthMbrIdSet()
          Do not call this method.
 Set<Group> getAuthorizedGroupSet()
          Get the set of Group authorized to read this Publication.
 Set<Member> getAuthorizedMemberSet()
          Get the set of Member authorized to read this Publication.
static Publication.AuthorizedSelector getAuthorizedSelector(Member member)
           
static Publication.CanWorkOnSelector getCanWorkOnSelector(Member member)
           
 Category[] getCategories()
          Retrieve the categories of this publication.
 Category[] getCategories(Member member)
          Returns the categories of the publication the member can read
 TreeSet<Category> getCategorySet()
          Returns the categories of this publication as a Set.
 Set<String> getCatIdSet()
          Do not call this method.
static
<T extends Publication>
Comparator<T>
getComparator(Class<T> clazz, String str, boolean reverse)
           
static Comparator getComparator(String str, boolean reverse)
          Retrieves a new Comparator given a name representing it.
static Comparator getComparator(String str, boolean reverse, QueryResultSet queryResultSet)
          Retrieves a new Comparator given a name representing it.
static String getCSVHeader(String lang)
          Returns the CSV header of this object
 String getDataName(String language)
          Return the name of this Data, every sub class Data which will be displayed to user should implements this method already.
 Date getDate(String dateType)
          Return the date corresponding to the given parameter : date/cdate, mdate, edate, pdate, sdate, adate, udate or null if nothing match or the matching date is null.
 Date getDate(String dateType, Date defaultDate)
          Return the date corresponding to the given parameter : date/cdate, mdate, edate, pdate, sdate, adate, udate, or null if nothing match or the matching date is null.
static DataSelector getDateSelector(String str, Date begin, Date end)
          Retrieves a new DataSelector given a name representing it.
 DBDataRevision getDBDataRevision(Data data, int op)
           
static
<T extends Publication>
Comparator<T>
getDdateComparator()
           
 String getDefaultTemplateUsage()
          Returns the default template usage used to display the publication.
 TreeSet<Category> getDescendantCategorySet(Category parent)
          Return the set of category of this publication which are the descendant category of a given parent category.
 TreeSet<Category> getDescendantCategorySet(Category parent, boolean includingParent)
          Return the set of category of this publication which are the descendant category of a given parent category, including the given parent category in case the parameter includingParent is true.
 TreeSet<Category> getDescendantCategorySet(Category parent, boolean includingParent, Member member)
          Return the set of category of this publication which are the descendant category of a given parent category, including the given parent category in case the parameter includingParent is true.
 String getDisplayTemplateFile()
          Deprecated. Must call instead getTemplatePath()
 Set<FileDocument> getDocumentLinkSet()
          Returns the set of documents attached to this publication.
 Date getEdate()
          Retrieve the expiration date of this publication.
static
<T extends Publication>
Comparator<T>
getEdateComparator()
           
static Publication.EdateSelector getEdateSelector(Date begin, Date end)
           
 int getEstimatedReminderCount()
          Returns an estimation of how many reminders have been sent since this publication is in this state.
 Set<String> getExternalLinkSet()
          Returns all the external link contains in this publication.
 Object getFieldInMainLanguage(Object field, HashMap fieldML)
           
 Object getFieldValue(String fieldName, String lang, boolean useDefault)
          Gets the value of the given Object field name for the current Data.
 Category getFirstDescendantCategory(Category parent)
          This convenient method returns the first category of the set returned by getDescendantCategorySet.
 Category getFirstDescendantCategory(Category parent, boolean includingParent)
          This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameter includingParent is true and the current publication has parent as category.
 Category getFirstDescendantCategory(Category parent, boolean includingParent, Member member)
          This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameter includingParent is true and the current publication has parent as category.
 List<Member> getFollowerList(boolean searchParents)
          Returns all the followers of this publication.
 TreeSet<String> getFriendlyURLSet()
          Get friendly urls Set.
 int getGlobalRating()
          Return the the average rating of all reviews on this publication.
 boolean getHasNoReadRights()
          Do not call this method.
 Publication getImportConflictCopy()
          Returns the conflict copy bound to this imported publication (or null if there is no conflict copy).
 String getImportVersion()
          Get the value of importVersion.
 Date getIndexingDate()
          Retrieve the Date at which this Publication was indexed in its search engine.
 TreeSet getLinkDataSet(Class clazz)
          Retuns all the data, instance of a given class, targeted by this publication through its link field (ie the link defined with the Type Editor.
 Publication getMainInstance()
          If this publication is a work copy then return the main instance
 String getMainLanguage()
          Get the value of main language.
 int getMajorVersion()
          Returns the major version.
 TreeSet<Member> getMemberSetAssignedToRole(String roleId)
          Returns the member bound to the given role.
 Date getMergeDate()
          Returns the date of the last merge with a work copy.
 String getMergeId()
          Returns the id of the work copy used for the last merge.
 int getMinorVersion()
          Returns the minor version.
 Set<WFState> getNextWFStateSet(Member member)
          Returns the set of WFState the given member can put this publication in, according the rights of the member, the workflow and the current state of the publication.
 Date getPdate()
          Retrieve the publication date of this publication.
static
<T extends Publication>
Comparator<T>
getPdateComparator()
           
static Publication.PdateSelector getPdateSelector(Date begin, Date end)
           
 int getPstatus()
          Get the value of pstatus.
 AlarmEntry getPstatusAlarmEntry(int pstatus)
          Get the alarmEntry bound to a given pstatus
static
<T extends Publication>
Comparator<T>
getPstatusComparator()
           
static Publication.PstatusSelector getPstatusSelector(int pstatus)
           
static Publication.PstatusSelector getPstatusSelector(int pstatus, int greater)
           
 String getQueryTemplateFile()
          Deprecated. Must call instead getTemplatePath()
static
<T extends Publication>
Comparator<T>
getRatingComparator()
           
static
<T extends Publication>
Comparator<T>
getReaderComparator()
           
 int getReaderCount()
           
 List<ReaderTracker> getReaderTrackerList()
          Returns the reader list for the given publication.
static Publication.ReadRightSelector getReadRightSelector()
           
 String getReadRightsString(int max)
          This convenient method returns a String displaying group/member read rights (eg if this publication is restricted to g1, g2, m1, m2 and m3, getReadRightsString(3) will return "g1, g2, m1, ...")
 AbstractReview getReview(Member author)
          Retrieves the review written by the given author and bound to this publication.
 int getReviewCount()
          Returns how many review are attached to this publication.
static
<T extends Publication>
Comparator<T>
getReviewCountComparator()
           
 List<AbstractReview> getReviewList()
          Retrieves all the reviews bound to this publication.
 List<AbstractReview> getReviewList(Member mbr)
          Retrieves all the reviews bound to this publication that the given member can access.
static
<T extends Publication>
Comparator<T>
getRightComparator()
           
 HashMap<String,TreeSet<Member>> getRoleMap()
           
 String getRoleMapStr()
          Returns the encoded String from the current roleMap (only used for DBData property mapping)
 Date getSdate()
          Retrieve the sort date of this publication.
static
<T extends Publication>
Comparator<T>
getSdateComparator()
           
static Publication.SdateSelector getSdateSelector(Date begin, Date end)
           
 String[] getSearchStrings()
          Searchable implementation
 String getTemplate(String usage)
          Returns the template name for the given usage
 TypeTemplateEntry getTemplateEntry(String usage, boolean devModeChecks)
          Returns the TypeTemplateEntry matching the given parameters.
static TypeTemplateEntry getTemplateEntry(String usage, boolean devModeChecks, Class<? extends Data> clazz, Workspace ws)
          Returns the TypeTemplateEntry matching the given parameters.
 Set<TypeTemplateEntry> getTemplateEntrySet()
          Returns a Set of TypeTemplateEntry matching current publication templates
 String getTemplatePath(JcmsJspContext ctxt)
          Returns the template path for the current context
 String getTemplatePath(String usage, boolean devModeChecks)
          Returns the template path for the given usage
 String[] getTemplates()
          Get the value of templates.
 String getTitle()
          Retrieve the title of this publication in the main site language.
 String getTitle(String lang)
          Get the value of title bound to the given language.
 String getTitle(String lang, boolean useDefault)
          Get the value of title bound to the given language.
static
<T extends Publication>
Comparator<T>
getTitleComparator()
           
static
<T extends Publication>
Comparator<T>
getTitleComparator(String lang)
           
 HashMap<String,String> getTitleML()
          Retrieve the HashMap containing the titles of this publication in language other than the main site language.
static Publication.TrackedSelector getTrackedSelector()
           
 Collection<? extends TreeNode> getTreeChildren()
          Returns a Collection of TreeNode children of the current node
 TreeNode getTreeParent()
          Returns parent of the current node
 TreeNode getTreeRoot()
          Returns the root of the current node
static
<T extends Publication>
Comparator<T>
getTypeComparator()
           
 String getTypeLabel(String lang)
          Returns the label of the type of this publication.
 Date getUdate()
          Returns the date of last major update.
static
<T extends Publication>
Comparator<T>
getUdateComparator()
           
static Publication.UdateSelector getUdateSelector(Date begin, Date end)
           
 Set<Group> getUpdateGroupSet()
          Get the value of updateGroupSet.
 Set<Member> getUpdateMemberSet()
          Get the value of updateMemberSet.
 String getVersionString()
          Returns the current version (major.minor) of this publication.
static Publication.VisibleStateSelector getVisibleStateSelector()
           
 Set<Publication> getWeakReferrerSet()
          Returns the set of weak referrers.
 List<WFNote> getWFNoteList()
          Returns the list of WFNote bound to this publication.
 WFState getWFState()
          Returns the WFState bound to the current pstatus or null if none
 String getWFStateLabel(String lang)
          This convenient method returns the Workflow's state label this publication is in.
 String getWFStateLabelHtml(String lang)
          This convenient method returns the HTML Workflow's state label this publication is in.
 Set<Publication> getWorkCopySet()
          Get the value of workCopySet.
 Workflow getWorkflow()
          Returns the Workflow bound to this publication
 Workspace getWorkspace()
           
static Publication.WorkspaceAuthorSelector getWorkspaceAuthorSelector(Workspace workspace, Member author)
           
static
<T extends Publication>
Comparator<T>
getWorkspaceComparator(String lang)
           
 String getWorkspaceId()
          Returns the JStore ID of the workspace (only for DBData)
static Publication.WorkspaceSelector getWorkspaceSelector(Workspace workspace)
           
 WSTypeEntry getWSTypeEntry()
          This method return a WSTypeEntry for the current workspace in the current class.
 WSTypeEntry getWSTypeEntry(Workspace wrkspc)
          This method return a WSTypeEntry for the given workspace in the current class.
 boolean hasAlreadyVoted(Member member)
          Check if the given member has already voted for this publication
 boolean hasAnyReadRights()
          Tests if this publication has member or group read rights.
 boolean hasBeenReadBy(Member mbr)
          Check if the given member has read this publication
 boolean hasCategory(Category cat)
          Test if a publication references a given category.
 boolean hasImportConflict()
          Returns true if this imported publication has a conflict copy.
 boolean hasNoReadRights()
          Tests if this publication has NO member read rights AND NO group read rights.
 boolean hasReview()
          Checks if this publication has at least one review.
 boolean hasWeakReferrers()
          Returns true if this publication has weak referrers.
 void importConvertToLocal(Member opAuthor)
          Converts this imported publication to a local data
 void importMarkAsMerged(Member opAuthor)
          Merges all the import extra data (import date, import version, ....) of the most recent conflict copy with the original.
 void importOverrideAndUpdate(Member opAuthor)
          Ignores all the local changes and replaces the local imported data with the conflict copy.
 void importXml(org.jdom.Element elt, ImportOptions options)
          Fill this data with the values contains in the JDOM element.
 void init(Member author, Workspace ws)
           This method initialise the object with default values for the given workspace: Default categories Default Authorized groups Default Pstatus Given Workspace Given Author and opAuthor
 void initCopy(Member newAuthor)
          Initialize this publication once it has been cloned for a copy (eg by duplicate.jsp)
 void initializeDBDataCollections()
          This methods force the collections of the DBData to be initialized()
 boolean isAudienced()
          Check if this publication is Audienced.
 boolean isDefaultTemplate(String usage)
          Checks if the publication use a default template for the given usage
 boolean isFollowedBy(Member mbr)
          Returns true if the given member follows this publication.
 boolean isImportConflictCopy()
          Returns true if this publication is an import conflict copy.
 boolean isInRole(String roleId, Member mbr)
          Determines whether the given member can use the given role for this publication
 boolean isInVisibleState()
          Returns true if this publication is in a visible state
 boolean isPublic()
          Returns true is this publication can be read by any one.
 boolean isRoleAssigned(String roleId)
          Determines whether there exists at least one member assigned to the given role
 boolean isTracked()
          Check if a the publication's readers are tracked
 boolean isTreeLeaf()
          Returns boolean true if the TreeNode is a leaf
 boolean isTreeNode()
          Returns boolean true if the TreeNode is a node
 boolean isUserContent()
          Returns true if this data is User Content.
static boolean isUserContentType(Class<?> clazz)
          Checks if the given class is a "User Content" That means a Publication not manage by JCMS workers.
 boolean isWorkCopy()
          Return true if this publication have a main instance
 void majorUpdate()
          Increments the major version
 void notifyFollowers(Member opAuthor, Map context)
          Notify all the follower of this publication.
protected  void performAfterWrite(int op, Member mbr, Map context)
          Called to perform some action after the write.
protected  void performBeforeWrite(int op, Member mbr, Map context)
          Called to perform some action before the write.
 void performCreate(Member mbr, Map context)
          Performs data creation
 void performDelete(Member mbr, Map context)
          Performs data deletion
 void performMerge(Member mbr)
          Performs publication merge
 void performMerge(Member mbr, Map context)
          Performs publication merge
 void performUpdate(Member mbr, Map context)
          Performs data update
protected  Publication prepareMergeCopy()
           
 void putPstatusAlarmEntry(int pstatus, AlarmEntry alarmEntry)
          Bind an AlarmEntry to a given pstatus
 void removeAllDescendants(Member opAuthor, Map context)
          Remove all descendant TreeNode that can be deleted
 void removeAllFollowers()
          Removes all the follower for this publication.
 void removeAllReaderTracker(Member opAuthor)
          Remove all the readers notes
 boolean removeAuthorizedGroup(Group grp)
          Remove an authorized group.
 boolean removeAuthorizedMember(Member mbr)
          Remove an authorized member.
 void removeCategory(Category cat)
          Remove the specified category from this publication's categories
protected  void removeDataSet(Member opAuthor, Set<? extends Data> dataSet)
          Remove all the data of the given data set
 void removeFollower(Member mbr)
          Removes the given follower for this publication.
 void removeImportMetadata()
          Remove all the import metadata on this publication
 AlarmEntry removePstatusAlarmEntry(int pstatus)
          Remove an AlarmEntry to a given pstatus
 void removeWeakReferrer(Publication referrer)
          Remove a weak referrer.
 void removeWFExpressAlarm()
          Removes the WFExpress alarm for this publication.
 void removeWFReminderAlarm()
          Removes the WFExpress alarm for this publication.
protected static TypeTemplateEntry resolveTypeTemplateEntry(WSTypeEntry wste, String usage, String[] templates)
          Returns TypeTemplateEntry matching given parameters.
 void setAbstract(String value)
          Set the value of the Abstract field in the main language (default site language or any other).
 void setAbstract(String lang, String value)
          Convenient method to set the value of the Abstract field in any language (default site language or any other).
depending on the specified language.
 void setAdate(Date v)
          Set the archiving date of this publication.
 void setAllCatIdSet(Set<String> v)
          Do not call this method.
 void setAuthGrpIdSet(Set<String> v)
          Do not call this method.
 void setAuthMbrIdSet(Set<String> v)
          Do not call this method.
 void setAuthorizedGroupSet(TreeSet<Group> groupSet)
          Set the set of Group authorized to read this Publication.
 void setAuthorizedMemberSet(TreeSet<Member> memberSet)
          Set the set of Member authorized to read this Publication.
 void setCategories(Category[] cats)
          Set categories of this publication.
 void setCategorySet(Set<Category> catSet)
          Replaces the current categories with this set of categories.
 void setCatIdSet(Set<String> v)
          Do not call this method.
 void setCdate(Date cdate)
          Set the cdate and update the udate
 void setEdate(Date v)
          Set the expiration date of this publication.
 void setFieldValue(String fieldName, Object value, String lang)
          Sets the value of the given Object field name for the current Data.
 void setFriendlyURLSet(TreeSet<String> v)
          Set the value of friendlyURLSet.
 void setHasNoReadRights(boolean b)
          Do not call this method.
 void setImportConflictCopy(boolean v)
          Set the value of isImportConflictCopy.
 void setImportVersion(String v)
          Set the value of importVersion.
 void setMainInstance(Publication mainInstance)
          If this publication is a work copy then set it's main instance
 void setMainLanguage(String v)
          Set the value of main language.
 void setMajorVersion(int majorVersion)
          Set the major version.
 void setMergeDate(Date mergeDate)
          Set the date of the last merge with a work copy
 void setMergeId(String mergeId)
          Set the id of the work copy used for the last merge.
 void setMinorVersion(int minorVersion)
          Set the minor version.
 void setPdate(Date v)
          Set the publication date of this publication.
 void setPstatus(int v)
          Set the value of pstatus.
 void setReaderCount(int v)
          Do not call this method.
 void setRoleMap(HashMap<String,Object> roleMap)
           
 void setRoleMapStr(String str)
          Assigns the roleMap from the given encoded String (only used for DBData property mapping)
 void setRoleMemberSetMap(HashMap<String,TreeSet<Member>> roleMap)
           
 void setSdate(Date v)
          Set the sort date of this publication.
 void setTemplate(String name)
           
 void setTemplates(String[] v)
          Set the value of templates.
 void setTitle(String v)
          Set the title of this publication in the main site language.
 void setTitle(String lang, String value)
          Convenient method to set the value of the Title field in any language (default site language or any other).
This method will set the proper field value (setTitle(String) or setTitleML(HashMap)) depending on the specified language.
 void setTitleML(HashMap<String,String> v)
          Set the HashMap containing the titles of this publication in language other than the main site language.
 void setTracked(boolean bool)
          Set the track flag
 void setUdate(Date udate)
          Set the date of last major update.
 void setUpdateGroupSet(TreeSet<Group> v)
          Set the value of updateGroupSet.
 void setUpdateMemberSet(TreeSet<Member> v)
          Set the value of updateMemberSet.
 void setWorkspace(Workspace workspace)
           
 void setWorkspaceId(String v)
          Sets the JStore ID of the workspace (only for DBData)
 String toCSV(String lang)
          Returns a CSV view of this object
 String toFullString()
           
 String toString()
           
 void trackReader(Member mbr)
          Track the given reader.
 void unassignMember(Member mbr)
          Unassign a member from all the role he has been assigned to.
 void unassignRole(String roleId)
          Unassigns a member to a role
 void updatePstatus(Member author, int newPstatus, String note)
          Change the pstatus of this publication, store it and generate a WFNote
protected  String[] updateTemplate(String name, String[] templates)
           
 
Methods inherited from class com.jalios.jcms.Data
canRequestLock, checkCreate, checkDelete, checkIntegrity, checkLock, checkLockMember, checkStrongLockMember, checkUpdate, clone, computeDBIDArray, exportXml, exportXml, exportXml, exportXml, exportXmlRelated, exportXmlRelated, fillExportXmlFieldAttributes, getAllReferrerSet, getAllReferrerSet, getAllTypeFieldEntry, getAuthor, getAuthor, getAuthorComparator, getAuthorDBID, getAuthorId, getAuthorSelector, getBooleanFieldValue, getBooleanFieldValue, getCaddyComparator, getCategoryFieldValue, getCategoryFieldValue, getCdateSelector, getDataImage, getDataImage, getDataImage, getDataNameComparator, getDeletableSelector, getDisplayUrl, getDoubleFieldValue, getDoubleFieldValue, getExportXmlDataValue, getExtension, getExtraData, getExtraDataMap, getExtraDBData, getExtraDBDataMap, getExtraInfo, getExtraInfoMap, getFieldStatusMap, getFieldValue, getFieldValue, getFieldValue, getGenericThumbnail, getImportAuthor, getImportBatch, getImportDate, getImportDisplayUrl, getImportId, getImportMap, getImportMdate, getImportSelector, getImportSignature, getImportSource, getImportSourceUrl, getImportUrl, getIntFieldValue, getIntFieldValue, getLinkCount, getLinkIndexedDataSet, getLinkIndexedDataSet, getLockDate, getLockInfo, getLockMember, getLongFieldValue, getLongFieldValue, getMdateSelector, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getOpAuthor, getOpAuthorComparator, getOpDelegate, getRowId, getRowIdComparator, getStrongLock, getStrongLockDate, getStrongLockInfo, getStrongLockMember, getStrongLockSelector, getTypeEntry, getTypeFieldsEntries, getUpdateInstance, hashCode, importXmlFieldsWithReferences, importXmlFiles, importXmlReferences, isDBData, isImported, isImportUpdated, isInDatabase, isLocked, isPersisted, isStrongLocked, lock, markNewImport, mergeHybridLink, performCreate, performDelete, performUpdate, prepareUpdateContext, putStrongLock, releaseStrongLock, releaseStrongLock, removeExtraData, removeExtraDBData, removeExtraInfo, setAuthor, setAuthorDBID, setAuthorId, setBooleanFieldValue, setCategoryFieldValue, setDoubleFieldValue, setExtension, setExtraData, setExtraDataMap, setExtraDBData, setExtraDBDataMap, setExtraDBDataMap, setExtraInfo, setFieldValue, setImportAuthor, setImportBatch, setImportDate, setImportDisplayUrl, setImportId, setImportMap, setImportMdate, setImportSignature, setImportSource, setImportSourceUrl, setImportUpdated, setIntFieldValue, setLongFieldValue, setMdate, setOpAuthor, setOpDelegate, setRowId, unlock, unlock, unmarkNewImport, updateExtraDataMap, updateExtraDBDataMap, updateIndexTreeSet
 
Methods inherited from class com.jalios.jstore.BasicStorable
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setDdate, setId, setStore, toXml
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

CTRL_TOPIC_CATEGORIES

public static final int CTRL_TOPIC_CATEGORIES
See Also:
Constant Field Values

CTRL_TOPIC_WORKFLOW

public static final int CTRL_TOPIC_WORKFLOW
See Also:
Constant Field Values

CTRL_TOPIC_ADVANCED

public static final int CTRL_TOPIC_ADVANCED
See Also:
Constant Field Values

indexMgr

protected static PublicationIndexManager indexMgr

mainLanguage

protected String mainLanguage

title

protected String title

titleML

protected HashMap<String,String> titleML

pdate

protected Date pdate

edate

protected Date edate

sdate

protected Date sdate

adate

protected Date adate

udate

protected Date udate

majorVersion

protected int majorVersion

minorVersion

protected transient int minorVersion

pstatus

protected int pstatus

mergeDate

protected Date mergeDate

mergeId

protected String mergeId

categories

protected Category[] categories

templates

protected String[] templates

authorizedMemberSet

protected TreeSet<Member> authorizedMemberSet

authorizedGroupSet

protected TreeSet<Group> authorizedGroupSet

updateMemberSet

protected TreeSet<Member> updateMemberSet

updateGroupSet

protected TreeSet<Group> updateGroupSet

mainInstance

protected Publication mainInstance

isTracked

protected boolean isTracked

friendlyURLSet

protected TreeSet<String> friendlyURLSet

workspace

protected Workspace workspace

roleMap

protected HashMap<String,TreeSet<Member>> roleMap

categorySet

protected transient TreeSet<Category> categorySet

wfExpressAlarmEntry

protected transient AlarmEntry wfExpressAlarmEntry

wfReminderAlarmEntry

protected transient AlarmEntry wfReminderAlarmEntry

catIdSet

protected transient Set<String> catIdSet

catIdSetDirty

protected transient boolean catIdSetDirty

catIdSetInit

protected transient boolean catIdSetInit

allCatIdSet

protected transient Set<String> allCatIdSet

authMbrIdSet

protected transient Set<String> authMbrIdSet

authMbrIdSetDirty

protected transient boolean authMbrIdSetDirty

authMbrIdSetInit

protected transient boolean authMbrIdSetInit

authGrpIdSet

protected transient Set<String> authGrpIdSet

authGrpIdSetDirty

protected transient boolean authGrpIdSetDirty

authGrpIdSetInit

protected transient boolean authGrpIdSetInit

hasNoReadRightsDBData

protected transient boolean hasNoReadRightsDBData

readerCount

protected transient int readerCount
Constructor Detail

Publication

public Publication()

Publication

public Publication(Publication other)
Method Detail

init

public void init(Member author,
                 Workspace ws)

This method initialise the object with default values for the given workspace:

It should be called after constructor and before setting parameters. Handlers already set theses parameters. This is a convenient method for external developpements.

Parameters:
author - the Author of the publication
ws - the workspace of the publication
Since:
jcms-5.6.0

getAllWikiText

public String getAllWikiText()
Returns a String which contains the concatenation of all the wiki fields.

Returns:
a String which contains the concatenation of all the wiki fields.
Since:
jcms-5.5.0

getAllWysiwygText

public String getAllWysiwygText()
Returns a String which contains the concatenation of all the wysiwyg fields.

Returns:
a String which contains the concatenation of all the wysiwyg fields.
Since:
jcms-5.5.0

getSearchStrings

public String[] getSearchStrings()
Searchable implementation

Specified by:
getSearchStrings in interface Searchable
Returns:
an array of Strings which contains only one string which is the concatenation of all the searchable string of this publication.
See Also:
Searchable.getSearchStrings()

hasCategory

public boolean hasCategory(Category cat)
Test if a publication references a given category.

Parameters:
cat - the category to be tested
Returns:
true if this publication has this category.

toString

public String toString()
Overrides:
toString in class Data
Returns:
the title of the publication

importXml

public void importXml(org.jdom.Element elt,
                      ImportOptions options)
Description copied from class: Data
Fill this data with the values contains in the JDOM element.

Overrides:
importXml in class Data
Parameters:
elt - the JDOM element
options - the ImportOptions

getImportConflictCopy

public Publication getImportConflictCopy()
Returns the conflict copy bound to this imported publication (or null if there is no conflict copy).

Returns:
the conflict copy bound to this imported publication (or null if there is no conflict copy).
Since:
jcms-5.7.2

hasImportConflict

public boolean hasImportConflict()
Returns true if this imported publication has a conflict copy.

Returns:
true if this imported publication has a conflict copy.
Since:
jcms-5.7.2

isImportConflictCopy

public boolean isImportConflictCopy()
Returns true if this publication is an import conflict copy.

Returns:
true if this publication is an import conflict copy.
Since:
jcms-5.7.2

setImportConflictCopy

public void setImportConflictCopy(boolean v)
Set the value of isImportConflictCopy.

Parameters:
v - Value to assign to isImportConflictCopy.
Since:
jcms-5.7.2

importMarkAsMerged

public void importMarkAsMerged(Member opAuthor)
Merges all the import extra data (import date, import version, ....) of the most recent conflict copy with the original. Then, removes all the conflit copies.

Parameters:
opAuthor - the author of the operation
Since:
jcms-5.7.2

importOverrideAndUpdate

public void importOverrideAndUpdate(Member opAuthor)
Ignores all the local changes and replaces the local imported data with the conflict copy.

Parameters:
opAuthor - the author of the operation.
Since:
jcms-5.7.2

importConvertToLocal

public void importConvertToLocal(Member opAuthor)
Converts this imported publication to a local data

Parameters:
opAuthor - the author of the operation
Since:
jcms-5.7.2

removeImportMetadata

public void removeImportMetadata()
Remove all the import metadata on this publication

Since:
jcms-5.7.3

computeSignature

@Deprecated
public String computeSignature()
Deprecated. use #computeSignature(boolean, boolean)

Compute the signature (MD5) of this publication. Common fields are ignored.

Returns:
the signature of this publication.
Since:
jcms-5.7.2
See Also:
computeSignature(boolean, boolean)

computeSignature

public String computeSignature(boolean includePublicationFields,
                               boolean hash)
Compute the signature of this publication.

Parameters:
includePublicationFields - if true add the common publication fields (author, pdate, categories, ...). Computed fields (cdate, mdate, udate, minorVersion) are skipped.
hash - if true hash (MD5) the signature otherwise return the complete string of the signature.
Returns:
the signature of this publication.
Since:
jcms-6.2.0

exportXmlField

public void exportXmlField(StringBuffer sb,
                           int indentLevel)
Description copied from class: Data
Fills the given StringBuffer with Xml export of fields of this data.

Overrides:
exportXmlField in class Data
Parameters:
sb - the StringBuffer
indentLevel - the indent level

getDocumentLinkSet

public Set<FileDocument> getDocumentLinkSet()
Returns the set of documents attached to this publication.

Returns:
the set of documents attached to this publication.
Since:
jcms-6.0.1

getAllFilePath

public Set<String> getAllFilePath()
Gives the set of all relatives path to all kind (image, media, file) of files linked from the given publication.

Returns:
a not null set of all relative path to linked files.
Since:
JCMS-6.1

getTypeLabel

public String getTypeLabel(String lang)
Returns the label of the type of this publication.

Parameters:
lang - the language
Returns:
the label of the type of this publication.
Since:
jcms-5.5.0

getVersionString

public String getVersionString()
Returns the current version (major.minor) of this publication.

Returns:
the current version (major.minor) of this publication.
Since:
jcms-5.7.0

majorUpdate

public void majorUpdate()
Increments the major version

Since:
jcms-5.7.0

toFullString

public String toFullString()
Overrides:
toFullString in class Data
Returns:
a debug string

toCSV

public String toCSV(String lang)
Returns a CSV view of this object

Overrides:
toCSV in class Data
Parameters:
lang - the output language
Returns:
a CSV view of this object
Since:
jcms-5.0.0

getCSVHeader

public static String getCSVHeader(String lang)
Returns the CSV header of this object

Parameters:
lang - the output language
Returns:
the CSV header of this object
Since:
jcms-5.0.0

getAbstract

public String getAbstract()
Returns the abstract of this publication in the channel's main language.

Returns:
the abstract of this publication in the channel's main language.

getAbstract

public String getAbstract(String lang,
                          boolean useDefault)
Returns the abstract of this publication.

Parameters:
lang - the user language (ISO-639 language code)
useDefault - should the default language be used
Returns:
the abstract of this publication.

getAbstract

public String getAbstract(String lang)
Returns the abstract of this publication.

Parameters:
lang - the user language
Returns:
the abstract of this publication.

getAbstractML

public HashMap<String,String> getAbstractML()
Returns the map containing abstracts of this publication in all language but the channel's main language.

Returns:
the map with ISO-639 language code as the key and abstract as the value, never return null.
Since:
jcms-6.0.0

setAbstract

public void setAbstract(String lang,
                        String value)
Convenient method to set the value of the Abstract field in any language (default site language or any other).
depending on the specified language.

Parameters:
lang - the language (ISO 639 code) in which to set the value
value - the value to set.
Since:
jcms-7.0.0

setAbstract

public void setAbstract(String value)
Set the value of the Abstract field in the main language (default site language or any other).

Parameters:
value - the value to set.
Since:
jcms-7.0.0

getGlobalRating

public int getGlobalRating()
Return the the average rating of all reviews on this publication.

Returns:
the average rating

clearTransientIndex

public void clearTransientIndex()
Clear all the transient fields that contains indexes. This method is typically called after cloning a publication.


initCopy

public void initCopy(Member newAuthor)
Initialize this publication once it has been cloned for a copy (eg by duplicate.jsp)

Parameters:
newAuthor - the author of this publication
Since:
jcms-4.0.2

createCopy

public Publication createCopy(Member mbr)
Creates a copy from this publication

Parameters:
mbr - the author of the copy
Returns:
a (stored) copy of this publication.
Since:
jcms-5.5.0

createWorkCopy

public Publication createWorkCopy(Member mbr)
Creates a work copy for this publication

Parameters:
mbr - the author of the work copy
Returns:
a (stored) work copy of this publication. Returns null if the member cannot create a work copy.
Since:
jcms-5.5.0

getDescendantCategorySet

public TreeSet<Category> getDescendantCategorySet(Category parent)
Return the set of category of this publication which are the descendant category of a given parent category. The set is ordered according the Category.OrderComparator. This methods only returns public categories (ie without read rights).

Parameters:
parent - the parent category
Returns:
a set of category.

getDescendantCategorySet

public TreeSet<Category> getDescendantCategorySet(Category parent,
                                                  boolean includingParent)
Return the set of category of this publication which are the descendant category of a given parent category, including the given parent category in case the parameter includingParent is true. The set is ordered according the Category.OrderComparator. This methods only returns public categories (ie without read rights).

Parameters:
parent - the parent category
includingParent - true if the parent has to be included in the set of tested categories
Returns:
a set of category.

getDescendantCategorySet

public TreeSet<Category> getDescendantCategorySet(Category parent,
                                                  boolean includingParent,
                                                  Member member)
Return the set of category of this publication which are the descendant category of a given parent category, including the given parent category in case the parameter includingParent is true. Check category read rights for the given member. The set is ordered according the Category.OrderComparator using current userLang (see Channel.getCurrentUserLang().

Parameters:
parent - the parent category
includingParent - true if the parent has to be included in the set of tested categories
member - if not null, checks if the category read rights for this member
Returns:
a set of category.
Since:
jcms-4.1

getFirstDescendantCategory

public Category getFirstDescendantCategory(Category parent)
This convenient method returns the first category of the set returned by getDescendantCategorySet. This methods only returns a public category (ie without read rights).

Parameters:
parent - the parent category
Returns:
the first category (or null if none)

getFirstDescendantCategory

public Category getFirstDescendantCategory(Category parent,
                                           boolean includingParent)
This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameter includingParent is true and the current publication has parent as category. This methods returns a public category (ie without read rights).

Parameters:
parent - the parent category
includingParent - true if the category membership test must be made on parent too
Returns:
the first category (or null if none)

getFirstDescendantCategory

public Category getFirstDescendantCategory(Category parent,
                                           boolean includingParent,
                                           Member member)
This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameter includingParent is true and the current publication has parent as category. Check category read rights for the given member.

Parameters:
parent - the parent category
includingParent - true if the category membership test must be made on parent too
member - if not null, checks if the category read rights for this member
Returns:
the first category (or null if none)
Since:
jcms-4.1

containsCategory

public boolean containsCategory(Category category)
This convenient method returns true if the publication contains a given category.

Parameters:
category - the category
Returns:
true if the publication contains the given category, false otherwise.

hasWeakReferrers

public boolean hasWeakReferrers()
Returns true if this publication has weak referrers.

Returns:
true if this publication has weak referrers.
Since:
jcms-5.5.0

getWeakReferrerSet

public Set<Publication> getWeakReferrerSet()
Returns the set of weak referrers.
  • DO NOT alter the returned set, clone prior modification..

    Returns:
    the set of weak referrers.
    Since:
    jcms-5.5.0

  • addWeakReferrer

    public void addWeakReferrer(Publication referrer)
    Add a weak referrer.

    Parameters:
    referrer - the weak referrer to be added.
    Since:
    jcms-5.5.0

    removeWeakReferrer

    public void removeWeakReferrer(Publication referrer)
    Remove a weak referrer.

    Parameters:
    referrer - the weak referrer to be removed.
    Since:
    jcms-5.5.0

    getExternalLinkSet

    public Set<String> getExternalLinkSet()
    Returns all the external link contains in this publication. An external link is an absolute URL contained in an URL field, a wiki field or a wysiwyg field. URLs of the site are exclude. This method is overridden by type having URL fields.

    Returns:
    all the external link contains in this publication.
    Since:
    jcms-5.5.0

    canBeReadBy

    public final boolean canBeReadBy(Member member,
                                     boolean searchInGroups)
    Check if a member can read this publication.

    Parameters:
    member - the member to check
    searchInGroups - if true check if one of the group this member belongs to is authorized to read this publication.
    Returns:
    true if the member can read this publication
    Since:
    jcms-2.1

    isUserContent

    public boolean isUserContent()
    Returns true if this data is User Content.

    Returns:
    true if this data is an instance of UserContent.
    Since:
    jcms-6.0.0

    isUserContentType

    public static boolean isUserContentType(Class<?> clazz)
    Checks if the given class is a "User Content" That means a Publication not manage by JCMS workers.

    Parameters:
    clazz - the working class
    Returns:
    boolean true if it is a UGC Publication
    Since:
    jcms-6.0.0

    canBeReadBy

    public boolean canBeReadBy(Member member)
    This convenient method is the same that canBeReadBy(member, true).

    Parameters:
    member - the member to check
    Returns:
    true if the member can read this publication
    Since:
    jcms-2.1
    See Also:
    canBeReadBy(com.jalios.jcms.Member,boolean)

    canBeReadBy

    public boolean canBeReadBy(Group group)
    Checks if a group can read this publication.

    Parameters:
    group - the group to check
    Returns:
    true if the group can read this publication
    Since:
    jcms-2.1

    isAudienced

    public boolean isAudienced()
    Check if this publication is Audienced.
    This methods directly calls RightPolicy.isAudienced(Publication).

    Returns:
    true if this publication is Audienced.
    Since:
    jcms-5.5.0
    See Also:
    RightPolicy.isAudienced(Publication)

    getAudiencedRightsString

    public String getAudiencedRightsString(String userLang,
                                           int max)
    This convenient method returns a String displaying categories used by audience right (eg if this publication is restricted to member, g2, m1, m2 and m3, getReadRightsString(3) will return "g1, g2, m1, ...")

    Parameters:
    userLang - the user language
    max - how many group/member to display
    Returns:
    a String
    Since:
    jcms-5.5.0

    hasAnyReadRights

    public boolean hasAnyReadRights()
    Tests if this publication has member or group read rights.

    Returns:
    true if there are member or group read rights.
    Since:
    jcms-5.0.4

    hasNoReadRights

    public boolean hasNoReadRights()
    Tests if this publication has NO member read rights AND NO group read rights.

    Returns:
    true if there are NO member read rights AND NO group read rights.
    Since:
    jcms-5.0.4

    getHasNoReadRights

    public boolean getHasNoReadRights()
    Do not call this method. It is reserved for DBData mapping.

    Returns:
    the value of hasNoReadRights()
    Since:
    jcms-6.2.0

    setHasNoReadRights

    public void setHasNoReadRights(boolean b)
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    getReadRightsString

    public String getReadRightsString(int max)
    This convenient method returns a String displaying group/member read rights (eg if this publication is restricted to g1, g2, m1, m2 and m3, getReadRightsString(3) will return "g1, g2, m1, ...")

    Parameters:
    max - how many group/member to display
    Returns:
    a String
    Since:
    jcms-4.0

    isPublic

    public boolean isPublic()
    Returns true is this publication can be read by any one.

    Returns:
    true is this publication can be read by any one.
    Since:
    jcms-6.0.1

    getMainInstance

    public Publication getMainInstance()
    If this publication is a work copy then return the main instance

    Returns:
    the main instance
    Since:
    jcms-4.0

    setMainInstance

    public void setMainInstance(Publication mainInstance)
    If this publication is a work copy then set it's main instance

    Parameters:
    mainInstance - the main instance
    Since:
    jcms-4.0

    isWorkCopy

    public boolean isWorkCopy()
    Return true if this publication have a main instance

    Returns:
    true if this publication have a main instance
    Since:
    jcms-4.0

    isInVisibleState

    public boolean isInVisibleState()
    Returns true if this publication is in a visible state

    Returns:
    true if this publication is in a visible state
    Since:
    jcms-4.0.2
    See Also:
    Channel.isVisiblePstatus(int)

    canBeArchived

    public ControllerStatus canBeArchived(Member mbr,
                                          Map context)
    Returns a ControllerStatus indicating if this publication can be archived or not

    Parameters:
    mbr - the member to check
    context - the
    Returns:
    a ControllerStatus indicating if this publication can be archived or not
    See Also:
    CustomArchiveManager.canBeArchived(com.jalios.jcms.Publication, com.jalios.jcms.Member, Map)

    canBeArchived

    public boolean canBeArchived(Member mbr)
    Check if the publication can be archived by the given member.

    Parameters:
    mbr -
    Returns:
    true if this publication can be archived
    Since:
    jcms-4.1.1
    See Also:
    canBeArchived(Member, Map)

    canCreateCopy

    public boolean canCreateCopy(Member mbr)
    Returns true if the given member can create a copy of this publication

    Parameters:
    mbr - the member to be checked
    Returns:
    true if a given member can create a copy of this publication
    Since:
    jcms-5.5.0

    canCreateCopy

    public boolean canCreateCopy(Member mbr,
                                 boolean isWorkCopy)
    Returns true if the given member can create a copy of this publication

    Parameters:
    mbr - the member to be checked
    isWorkCopy - true if this is a workCopy
    Returns:
    true if a given member can create a copy of this publication
    Since:
    jcms-5.6.0

    canCreateWorkCopy

    public boolean canCreateWorkCopy(Member mbr)
    Returns true if the given member can create a work copy of this publication

    Parameters:
    mbr - the member to be checked
    Returns:
    true if a given member can create a work copy of this publication
    Since:
    jcms-4.0

    canMergeWorkCopy

    public boolean canMergeWorkCopy(Member mbr)
    Returns true if the given member can merge this work copy with it's main instance

    Parameters:
    mbr - the member to be checked
    Returns:
    true if the given member can merge this work copy with it's main instance
    Since:
    jcms-4.0

    canBeEditedFieldByField

    public boolean canBeEditedFieldByField(Member mbr)
    Returns true if this publication can be edited field by field on the front-office by the given member.

    Parameters:
    mbr - the member to check
    Returns:
    true if this publication can be edited field by field on the front-office by the given member.
    Since:
    jcms-5.5.0

    getWorkflow

    public Workflow getWorkflow()
    Returns the Workflow bound to this publication

    Returns:
    the Workflow bound to this publication
    Since:
    jcms-4.0.1

    getWFState

    public WFState getWFState()
    Returns the WFState bound to the current pstatus or null if none

    Returns:
    the WFState bound to the current pstatus or null if none
    Since:
    jcms-3.0

    getWFStateLabel

    public String getWFStateLabel(String lang)
    This convenient method returns the Workflow's state label this publication is in. The label is localized according the given language.

    Parameters:
    lang - the language used for localisation.
    Returns:
    the String of the label of the WFState bound to the current pstatus or "???" if unknown state.
    Since:
    jcms-5.7
    See Also:
    getWFState()

    getWFStateLabelHtml

    public String getWFStateLabelHtml(String lang)
    This convenient method returns the HTML Workflow's state label this publication is in. The label is localized according the given language.

    Parameters:
    lang -
    Returns:
    the HTML code of the label of the WFState bound to the current pstatus or "???" if unknown state.
    Since:
    jcms-7.0.0

    getNextWFStateSet

    public Set<WFState> getNextWFStateSet(Member member)
    Returns the set of WFState the given member can put this publication in, according the rights of the member, the workflow and the current state of the publication.

    Parameters:
    member - the member.
    Returns:
    the set of WFState the given member can put this publication in.
    Since:
    jcms-5.7.0

    getPstatusAlarmEntry

    public AlarmEntry getPstatusAlarmEntry(int pstatus)
    Get the alarmEntry bound to a given pstatus

    Parameters:
    pstatus - the pstatus
    Returns:
    an AlarmEntry
    Since:
    jcms-2.1

    putPstatusAlarmEntry

    public void putPstatusAlarmEntry(int pstatus,
                                     AlarmEntry alarmEntry)
    Bind an AlarmEntry to a given pstatus

    Parameters:
    pstatus - the pstatus
    alarmEntry - the AlarmEntry
    Since:
    jcms-2.1

    removePstatusAlarmEntry

    public AlarmEntry removePstatusAlarmEntry(int pstatus)
    Remove an AlarmEntry to a given pstatus

    Parameters:
    pstatus - the pstatus
    Returns:
    the removed AlarmEntry
    Since:
    jcms-2.1

    getLinkDataSet

    public TreeSet getLinkDataSet(Class clazz)
    Retuns all the data, instance of a given class, targeted by this publication through its link field (ie the link defined with the Type Editor. It does not includes the author. The default implementation of this method return an empty TreeSet. It must be overided by each Custom Publication Type.

    Parameters:
    clazz - the class of Data
    Returns:
    a TreeSet of instance of clazz
    Since:
    jcms-4.0

    checkLang

    public boolean checkLang(String lang)
    Check if the publication is available for the given language. Returns true if the title or the abstract of the publication is available in the given language.

    Parameters:
    lang - the language to check (lower-case two-letter codes as defined by ISO-639 (eg: en, fr, de, es, ...)
    Returns:
    true if the title or the abstract of the publication is available in the given language
    Since:
    jcms-4.0

    getCategories

    public Category[] getCategories(Member member)
    Returns the categories of the publication the member can read

    Parameters:
    member - the member to be checked
    Returns:
    the categories of the publication the member can read
    Since:
    jcms-4.1

    getCategorySet

    public TreeSet<Category> getCategorySet()
    Returns the categories of this publication as a Set.

    Do not modify the returned value !! This method returns an internal index which is not stored. If you need to modify the categories of this publication, see methods setCategories(Category[]), addCategory(Category) or removeCategory(Category).
    This methods always returns a set with the exact same categories available through getCategories().

    Returns:
    a TreeSet of categories (never return null). DO NOT modify this set.
    Since:
    jcms-5.0.0

    setCategorySet

    public void setCategorySet(Set<Category> catSet)
    Replaces the current categories with this set of categories.

    Parameters:
    catSet - the new category set
    Since:
    jcms-5.7.2

    addCategory

    public void addCategory(Category cat)
    Add the given category to the categories of this publication

    Parameters:
    cat - the category to be added
    Since:
    jcms-5.0.0

    removeCategory

    public void removeCategory(Category cat)
    Remove the specified category from this publication's categories

    Parameters:
    cat - the category to be removed
    Since:
    jcms-5.6.2 jcms-5.7.1

    updatePstatus

    public void updatePstatus(Member author,
                              int newPstatus,
                              String note)
    Change the pstatus of this publication, store it and generate a WFNote

    Parameters:
    author - the author of this update (ie the author of the WFNote)
    newPstatus - new value of pstatus
    note - the WFNote's comment
    Since:
    jcms-5.0.0

    getWSTypeEntry

    public WSTypeEntry getWSTypeEntry(Workspace wrkspc)
    This method return a WSTypeEntry for the given workspace in the current class. If workspace is null then the workspace of the publication will be used.

    Parameters:
    wrkspc - The working Workspace
    Returns:
    WSTypeEntry the TypeEntry
    Since:
    jcms-5.5.0
    See Also:
    Workspace.getWSTypeEntry(Class)

    getWSTypeEntry

    public WSTypeEntry getWSTypeEntry()
    This method return a WSTypeEntry for the current workspace in the current class.

    Returns:
    WSTypeEntry the TypeEntry
    Since:
    jcms-6.0.0
    See Also:
    getWSTypeEntry(Workspace)

    getDisplayTemplateFile

    @Deprecated
    public String getDisplayTemplateFile()
    Deprecated. Must call instead getTemplatePath()


    getQueryTemplateFile

    @Deprecated
    public String getQueryTemplateFile()
    Deprecated. Must call instead getTemplatePath()


    getDefaultTemplateUsage

    public String getDefaultTemplateUsage()
    Returns the default template usage used to display the publication. This default tempalte may change between Content and Portlets

    Returns:
    String the default usage

    isDefaultTemplate

    public boolean isDefaultTemplate(String usage)
    Checks if the publication use a default template for the given usage

    Parameters:
    usage - the template usage
    Returns:
    boolean true if the publication use a default template for the given usage

    getTemplate

    public String getTemplate(String usage)
    Returns the template name for the given usage

    Parameters:
    usage - the template usage
    Returns:
    String the name of the template used

    getTemplatePath

    public String getTemplatePath(JcmsJspContext ctxt)
    Returns the template path for the current context

    Parameters:
    ctxt - the JcmsJspContext
    Returns:
    String the path of the template used

    getTemplatePath

    public String getTemplatePath(String usage,
                                  boolean devModeChecks)
    Returns the template path for the given usage

    Parameters:
    usage - the template usage
    devModeChecks - perform developpement checks on template
    Returns:
    String the path of the template used

    getTemplateEntry

    public TypeTemplateEntry getTemplateEntry(String usage,
                                              boolean devModeChecks)
    Returns the TypeTemplateEntry matching the given parameters. It returns a default template if the given one does work.

    Parameters:
    usage - the template usage
    devModeChecks - perform developpement checks on template
    Returns:
    TypeTemplateEntry the matching templates

    getTemplateEntry

    public static TypeTemplateEntry getTemplateEntry(String usage,
                                                     boolean devModeChecks,
                                                     Class<? extends Data> clazz,
                                                     Workspace ws)
    Returns the TypeTemplateEntry matching the given parameters. It returns a default template if the given one does work.

    Parameters:
    usage - the template usage
    devModeChecks - perform developpement checks on template
    clazz - the template publication class
    ws - the workspace where to create the publication
    Returns:
    TypeTemplateEntry the matching templates

    resolveTypeTemplateEntry

    protected static TypeTemplateEntry resolveTypeTemplateEntry(WSTypeEntry wste,
                                                                String usage,
                                                                String[] templates)
    Returns TypeTemplateEntry matching given parameters. Internal mechanism - may default usage on a more generic usage - will use default template if the tempalte list is null

    Parameters:
    wste - the Type Description
    usage - the template usage
    templates - null or available tempaltes
    Returns:
    TypeTemplateEntry
    See Also:
    TypeEntry.getFirstTemplateEntry(String, String[])

    checkTemplateEntry

    protected static boolean checkTemplateEntry(TypeTemplateEntry tte,
                                                String usage,
                                                boolean devModeChecks,
                                                String label)
    Checks if the given TypeTemplateEntry is matching dev modes In developpement mode it throws exception if template is null or jsp is missing In production mode it returns default template if template is null but do not check if JSP template exists to improve performances.

    Parameters:
    tte - the TypeTemplateEntry to check
    devModeChecks - perform developpement checks on template
    label - String use for error message
    Returns:
    true if the TypeTemplateEntry match requirement

    getTemplateEntrySet

    public Set<TypeTemplateEntry> getTemplateEntrySet()
    Returns a Set of TypeTemplateEntry matching current publication templates

    Returns:
    Set of TypeTemplateEntry

    getTemplates

    public String[] getTemplates()
    Get the value of templates.

    Returns:
    Value of templates.

    setTemplates

    public void setTemplates(String[] v)
    Set the value of templates.

    Parameters:
    v - Value to assign to templates.

    setTemplate

    public void setTemplate(String name)

    updateTemplate

    protected String[] updateTemplate(String name,
                                      String[] templates)

    getFieldInMainLanguage

    public Object getFieldInMainLanguage(Object field,
                                         HashMap fieldML)

    getMainLanguage

    public String getMainLanguage()
    Get the value of main language.

    Returns:
    Value of main language.

    setMainLanguage

    public void setMainLanguage(String v)
    Set the value of main language.

    Parameters:
    v - Value to assign to main language.

    getDataName

    public String getDataName(String language)
    Description copied from class: Data
    Return the name of this Data, every sub class Data which will be displayed to user should implements this method already.
    Can be seen as a smart multi-language toString(), but never returning null.
    Default behaviour is to return toFullString() of Data or empty string if toFullString is null.

    Overrides:
    getDataName in class Data
    Parameters:
    language - the language in which to return the name if multilang available for the data.
    Returns:
    title of Publication in given language or empty String if not specified.
    Since:
    jcms-5.1
    See Also:
    getTitle(String), Data.getDataName(String)

    getTitle

    public String getTitle(String lang)
    Get the value of title bound to the given language.

    Parameters:
    lang - the language to get the title
    Returns:
    title in the given language.
    Since:
    jcms-4.0

    getTitle

    public String getTitle(String lang,
                           boolean useDefault)
    Get the value of title bound to the given language.

    Parameters:
    lang - the language to get the title
    useDefault - should main language used as default language if title does not exist in the given language
    Returns:
    title in the given language.
    Since:
    jcms-4.0

    getTitle

    public String getTitle()
    Retrieve the title of this publication in the main site language.

    Returns:
    Value of title.

    setTitle

    public void setTitle(String v)
    Set the title of this publication in the main site language.

    Parameters:
    v - value to assign to title.

    getTitleML

    public HashMap<String,String> getTitleML()
    Retrieve the HashMap containing the titles of this publication in language other than the main site language.

    Returns:
    an HashMap of String.
    Since:
    jcms-4.0

    setTitleML

    public void setTitleML(HashMap<String,String> v)
    Set the HashMap containing the titles of this publication in language other than the main site language.

    Parameters:
    v - an HashMap of String.
    Since:
    jcms-4.0

    setTitle

    public void setTitle(String lang,
                         String value)
    Convenient method to set the value of the Title field in any language (default site language or any other).
    This method will set the proper field value (setTitle(String) or setTitleML(HashMap)) depending on the specified language.

    Parameters:
    lang - the language (ISO 639 code) in which to set the value
    value - the value to set.
    Since:
    jcms-5.7

    getPdate

    public Date getPdate()
    Retrieve the publication date of this publication.

    Returns:
    the publication Date or null if not available.

    setPdate

    public void setPdate(Date v)
    Set the publication date of this publication.

    Parameters:
    v - the Date to assign, can be null.

    getEdate

    public Date getEdate()
    Retrieve the expiration date of this publication.

    Returns:
    the expiration Date or null if not available.

    setEdate

    public void setEdate(Date v)
    Set the expiration date of this publication.

    Parameters:
    v - the Date to assign, can be null.

    getSdate

    public Date getSdate()
    Retrieve the sort date of this publication.

    Returns:
    the sort Date or null if not available.
    Since:
    jcms-4.0

    setSdate

    public void setSdate(Date v)
    Set the sort date of this publication.

    Parameters:
    v - the Date to assign, can be null.
    Since:
    jcms-4.0

    getAdate

    public Date getAdate()
    Retrieve the archiving date of this publication.

    Returns:
    the archiving Date or null if not available.
    Since:
    jcms-4.1.1

    setAdate

    public void setAdate(Date v)
    Set the archiving date of this publication.

    Parameters:
    v - the Date to assign, can be null.
    Since:
    jcms-5.0.0

    setUdate

    public void setUdate(Date udate)
    Set the date of last major update.

    Parameters:
    udate - the date
    Since:
    jcms-5.7.0

    getUdate

    public Date getUdate()
    Returns the date of last major update.

    Returns:
    the date of last major update.
    Since:
    jcms-5.7.0

    getPstatus

    public int getPstatus()
    Get the value of pstatus.

    Returns:
    Value of pstatus.

    setPstatus

    public void setPstatus(int v)
    Set the value of pstatus.

    Parameters:
    v - Value to assign to pstatus.

    getMajorVersion

    public int getMajorVersion()
    Returns the major version.

    Returns:
    the major version.
    Since:
    jcms-5.7.0

    setMajorVersion

    public void setMajorVersion(int majorVersion)
    Set the major version.

    Parameters:
    majorVersion - the major version
    Since:
    jcms-5.7.0

    getMinorVersion

    public int getMinorVersion()
    Returns the minor version. This field is not persistent. It is incremented each time the object is saved. It is reset when the major version is incremented (e.g. 1.0, 1.1, 1.2, 2.0, 2.1, ...)

    Returns:
    the minor version.
    Since:
    jcms-5.7.0

    setMinorVersion

    public void setMinorVersion(int minorVersion)
    Set the minor version.

    Parameters:
    minorVersion - the minor version.
    Since:
    jcms-5.7.0

    setCdate

    public void setCdate(Date cdate)
    Set the cdate and update the udate

    Specified by:
    setCdate in interface Storable
    Overrides:
    setCdate in class BasicStorable
    Parameters:
    cdate - Value to assign to cdate.
    Since:
    jcms-5.7.0
    See Also:
    BasicStorable.setCdate(java.util.Date)

    setMergeDate

    public void setMergeDate(Date mergeDate)
    Set the date of the last merge with a work copy

    Parameters:
    mergeDate - the merge date.
    Since:
    jcms-5.7.0

    getMergeDate

    public Date getMergeDate()
    Returns the date of the last merge with a work copy.

    Returns:
    the date of the last merge with a work copy.
    Since:
    jcms-5.7.0

    setMergeId

    public void setMergeId(String mergeId)
    Set the id of the work copy used for the last merge.

    Parameters:
    mergeId -
    Since:
    jcms-5.7.0

    getMergeId

    public String getMergeId()
    Returns the id of the work copy used for the last merge.

    Returns:
    the id of the work copy used for the last merge.
    Since:
    jcms-5.7.0

    getCategories

    public Category[] getCategories()
    Retrieve the categories of this publication.

    Returns:
    an array of Category (can be null or empty).

    setCategories

    public void setCategories(Category[] cats)
    Set categories of this publication.

    Parameters:
    cats - an array of Category (can be null or empty).

    getCatIdSet

    public Set<String> getCatIdSet()
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    setCatIdSet

    public void setCatIdSet(Set<String> v)
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    getAllCatIdSet

    public Set<String> getAllCatIdSet()
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    setAllCatIdSet

    public void setAllCatIdSet(Set<String> v)
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    getReviewList

    public List<AbstractReview> getReviewList()
    Retrieves all the reviews bound to this publication. Get the value of reviewSet.

    Returns:
    a List of AbstractReview

    getReviewList

    public List<AbstractReview> getReviewList(Member mbr)
    Retrieves all the reviews bound to this publication that the given member can access.

    Parameters:
    mbr - the member
    Returns:
    a List of AbstractReview

    getReview

    public AbstractReview getReview(Member author)
    Retrieves the review written by the given author and bound to this publication.

    Parameters:
    author - the author of the Review
    Returns:
    the AbstractReview or null if none could be found.

    getReviewCount

    public int getReviewCount()
    Returns how many review are attached to this publication.

    Returns:
    how many review are attached to this publication.
    Since:
    jcms-6.0.0

    hasReview

    public boolean hasReview()
    Checks if this publication has at least one review.

    Returns:
    true if this publication has at least one review.
    Since:
    jcms-6.0.0

    getWorkCopySet

    public Set<Publication> getWorkCopySet()
    Get the value of workCopySet.

    Returns:
    Value of workCopySet.
    Since:
    jcms-5.5.0

    getAuthorizedMemberSet

    public Set<Member> getAuthorizedMemberSet()
    Get the set of Member authorized to read this Publication.

    Returns:
    a set of Member.
    Since:
    jcms-2.1

    setAuthorizedMemberSet

    public void setAuthorizedMemberSet(TreeSet<Member> memberSet)
    Set the set of Member authorized to read this Publication.

    Parameters:
    memberSet - a set of Member.
    Since:
    jcms-2.1

    addAuthorizedMember

    public void addAuthorizedMember(Member mbr)
    Add an authorized member.

    Parameters:
    mbr - the member to be added.
    Since:
    jcms-5.5.0

    removeAuthorizedMember

    public boolean removeAuthorizedMember(Member mbr)
    Remove an authorized member.

    Parameters:
    mbr - the member to be removed.
    Returns:
    true if the set contained the specified member.
    Since:
    jcms-5.5.0

    getAuthMbrIdSet

    public Set<String> getAuthMbrIdSet()
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    setAuthMbrIdSet

    public void setAuthMbrIdSet(Set<String> v)
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    getAuthorizedGroupSet

    public Set<Group> getAuthorizedGroupSet()
    Get the set of Group authorized to read this Publication.

    Returns:
    a set of Group.
    Since:
    jcms-2.1

    setAuthorizedGroupSet

    public void setAuthorizedGroupSet(TreeSet<Group> groupSet)
    Set the set of Group authorized to read this Publication.

    Parameters:
    groupSet - a set of Group.
    Since:
    jcms-2.1

    addAuthorizedGroup

    public void addAuthorizedGroup(Group grp)
    Add an authorized group

    Parameters:
    grp - the group to be added.
    Since:
    jcms-5.5.0

    removeAuthorizedGroup

    public boolean removeAuthorizedGroup(Group grp)
    Remove an authorized group.

    Parameters:
    grp - the group to be removed.
    Returns:
    true if the set contained the specified group.
    Since:
    jcms-5.5.0

    getAuthGrpIdSet

    public Set<String> getAuthGrpIdSet()
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    setAuthGrpIdSet

    public void setAuthGrpIdSet(Set<String> v)
    Do not call this method. It is reserved for DBData mapping.

    Since:
    jcms-6.2.0

    getUpdateMemberSet

    public Set<Member> getUpdateMemberSet()
    Get the value of updateMemberSet.

    Returns:
    Value of updateMemberSet.
    Since:
    jcms-2.1

    setUpdateMemberSet

    public void setUpdateMemberSet(TreeSet<Member> v)
    Set the value of updateMemberSet.

    Parameters:
    v - Value to assign to updateMemberSet.
    Since:
    jcms-2.1

    getUpdateGroupSet

    public Set<Group> getUpdateGroupSet()
    Get the value of updateGroupSet.

    Returns:
    Value of updateGroupSet.
    Since:
    jcms-2.1

    setUpdateGroupSet

    public void setUpdateGroupSet(TreeSet<Group> v)
    Set the value of updateGroupSet.

    Parameters:
    v - Value to assign to updateGroupSet.
    Since:
    jcms-2.1

    isTracked

    public boolean isTracked()
    Check if a the publication's readers are tracked

    Returns:
    true if the publication's readers are tracked
    Since:
    jcms-4.0.2

    setTracked

    public void setTracked(boolean bool)
    Set the track flag

    Parameters:
    bool - a boolean
    Since:
    jcms-4.0.2

    canBeFollowedBy

    public boolean canBeFollowedBy(Member mbr)
    Returns true if the given member can follow this publication

    Parameters:
    mbr - the member
    Since:
    jcms-7.0.0

    addFollower

    public void addFollower(Member mbr)
    Adds a follower for this publication.

    Parameters:
    mbr - the follower
    Since:
    jcms-7.0.0

    removeFollower

    public void removeFollower(Member mbr)
    Removes the given follower for this publication.

    Parameters:
    mbr - the follower
    Since:
    jcms-7.0.0

    removeAllFollowers

    public void removeAllFollowers()
    Removes all the follower for this publication.

    Since:
    jcms-7.0.0

    isFollowedBy

    public boolean isFollowedBy(Member mbr)
    Returns true if the given member follows this publication.

    Parameters:
    mbr - the member to test
    Returns:
    true if the given member follows this publication.
    Since:
    jcms-7.0.0

    getFollowerList

    public List<Member> getFollowerList(boolean searchParents)
    Returns all the followers of this publication.

    Parameters:
    searchParents - if true search followers of the (TreeNode) parent of this publication
    Returns:
    all the followers of this publication.
    Since:
    jcms-7.0.0

    notifyFollowers

    public void notifyFollowers(Member opAuthor,
                                Map context)
    Notify all the follower of this publication.

    Parameters:
    opAuthor - the member who sets off this notification. This member won't be notified.
    context - the context
    Since:
    jcms-7.0.0

    getWorkspace

    public Workspace getWorkspace()
    Returns:
    Returns the workspace.

    setWorkspace

    public void setWorkspace(Workspace workspace)
    Parameters:
    workspace - The workspace to set.

    getRoleMap

    public HashMap<String,TreeSet<Member>> getRoleMap()
    Returns:
    Returns the roleMap.
    Since:
    jcms-5.5.0

    setRoleMap

    public void setRoleMap(HashMap<String,Object> roleMap)
    Parameters:
    roleMap - The roleMap to set
    Since:
    jcms-5.5.0

    setRoleMemberSetMap

    public void setRoleMemberSetMap(HashMap<String,TreeSet<Member>> roleMap)

    setRoleMapStr

    public void setRoleMapStr(String str)
    Assigns the roleMap from the given encoded String (only used for DBData property mapping)

    Parameters:
    str - the encoded string.
    Since:
    jcms-7.0.1

    getRoleMapStr

    public String getRoleMapStr()
    Returns the encoded String from the current roleMap (only used for DBData property mapping)

    Since:
    jcms-7.0.1

    assignRole

    public void assignRole(String roleId,
                           Member mbr)
    Assigns a member to a role

    Parameters:
    roleId - the identifier of the WF role (e.g. "validators")
    mbr - the member to be assigned to the role
    Since:
    jcms-5.5.0

    assignRole

    public void assignRole(String roleId,
                           TreeSet<Member> mbrSet)

    unassignRole

    public void unassignRole(String roleId)
    Unassigns a member to a role

    Parameters:
    roleId - the identifier of the WF role (e.g. "validators")
    Since:
    jcms-5.5.0

    unassignMember

    public void unassignMember(Member mbr)
    Unassign a member from all the role he has been assigned to.

    Parameters:
    mbr - the member to be unassigned.
    Since:
    jcms-5.5.0

    isRoleAssigned

    public boolean isRoleAssigned(String roleId)
    Determines whether there exists at least one member assigned to the given role

    Parameters:
    roleId - the WFRole ID to be checked
    Returns:
    true if there exists at least one member assigned to the given role
    Since:
    jcms-5.5.0

    getMemberSetAssignedToRole

    public TreeSet<Member> getMemberSetAssignedToRole(String roleId)
    Returns the member bound to the given role.

    Parameters:
    roleId - the WFRole ID to be checked
    Returns:
    the member bound to the given role.
    Since:
    jcms-5.5.0

    isInRole

    public boolean isInRole(String roleId,
                            Member mbr)
    Determines whether the given member can use the given role for this publication

    Parameters:
    roleId - the WFRole ID
    mbr - the member to be checked
    Returns:
    true if the member can use the given role
    Since:
    jcms-5.5.0

    getFriendlyURLSet

    public TreeSet<String> getFriendlyURLSet()
    Get friendly urls Set.

    Returns:
    a TreeSet of friendly url (String).

    setFriendlyURLSet

    public void setFriendlyURLSet(TreeSet<String> v)
    Set the value of friendlyURLSet.

    Parameters:
    v - Value to assign to friendlyURLSet.

    hasBeenReadBy

    public boolean hasBeenReadBy(Member mbr)
    Check if the given member has read this publication

    Parameters:
    mbr - The member you want to test
    Returns:
    true if the member has read false instead
    Since:
    jcms-4.0.2

    getReaderTrackerList

    public List<ReaderTracker> getReaderTrackerList()
    Returns the reader list for the given publication.

    Returns:
    the reader list for the given publication.
    Since:
    jcms-6.0.0

    getReaderCount

    public int getReaderCount()
    Returns:
    the number of reader for this publication
    Since:
    jcms-4.0.2

    setReaderCount

    public void setReaderCount(int v)
    Do not call this method. It is reserved for DBData mapping.

    Parameters:
    v - the value
    Since:
    jcms-6.2.0

    getAccessCount

    public int getAccessCount()
    Returns:
    the number of access for this publication
    Since:
    jcms-6.0.0

    trackReader

    public void trackReader(Member mbr)
    Track the given reader.

    Parameters:
    mbr - the user to be tracked (may be null).
    Since:
    jcms-6.0.0

    removeAllReaderTracker

    public void removeAllReaderTracker(Member opAuthor)
    Remove all the readers notes

    Parameters:
    opAuthor - the member who performs this operation
    Since:
    jcms-6.0.0

    removeDataSet

    protected void removeDataSet(Member opAuthor,
                                 Set<? extends Data> dataSet)
    Remove all the data of the given data set

    Parameters:
    opAuthor - the member who performs this operation
    dataSet - the data set to be removed
    Since:
    jcms-5.5.0

    removeAllDescendants

    public void removeAllDescendants(Member opAuthor,
                                     Map context)
    Remove all descendant TreeNode that can be deleted

    Parameters:
    opAuthor - the member who performs this operation
    context - the DataController's context
    Since:
    jcms-5.0.0

    hasAlreadyVoted

    public boolean hasAlreadyVoted(Member member)
    Check if the given member has already voted for this publication

    Parameters:
    member - the member to check
    Returns:
    true if the given member has already voted (ie add a WFNote) in the workflow for this publication.
    Since:
    jcms-4.0.2

    addWFExpressAlarm

    public void addWFExpressAlarm()
    Adds a WFExpress alarm for this publication (only for main leader replica).

    Since:
    jcms-5.5.0

    removeWFExpressAlarm

    public void removeWFExpressAlarm()
    Removes the WFExpress alarm for this publication.

    Since:
    jcms-5.5.0

    addWFReminderAlarm

    public void addWFReminderAlarm()
    Adds a WFReminder alarm for this publication (only for main leader replica).

    Since:
    jcms-5.5.0

    removeWFReminderAlarm

    public void removeWFReminderAlarm()
    Removes the WFExpress alarm for this publication.

    Since:
    jcms-5.5.0

    getEstimatedReminderCount

    public int getEstimatedReminderCount()
    Returns an estimation of how many reminders have been sent since this publication is in this state. If the publication is in a state without reminder, it returns -1.

    Returns:
    the reminder count or -1 if this publication is in a state without reminder.
    Since:
    jcms-5.5.0

    checkStateChange

    public Object[] checkStateChange(Member mbr,
                                     int newPstatus)
    Checks if the state change can be performed (it checks if the transition's rule can be perfomed)

    Parameters:
    mbr - the member who submit the state change
    newPstatus - the new pstatus
    Returns:
    an Objec[] which contains 1) a Boolean which determines if the transition must be performed 2) the WFNote of the member if it has already voted.
    Since:
    jcms-5.5.0

    checkStateChange

    public Object[] checkStateChange(Member mbr,
                                     int newPstatus,
                                     int oldPstatus)
    Checks if the state change can be performed (it checks if the transition's rule can be perfomed)

    Parameters:
    mbr - the member who submit the state change
    newPstatus - the new pstatus
    oldPstatus - the old pstatus
    Returns:
    an Objec[] which contains 1) a Boolean which determines if the transition must be performed 2) the WFNote of the member if it has already voted.
    Since:
    jcms-6.1.3

    createWFNote

    public boolean createWFNote(Member mbr,
                                int newPstatus,
                                String note)
    Create/Update a WFNote and check if the transition can be performed.

    Parameters:
    mbr - the member which performe this operation
    newPstatus - new pstatus
    note - member's comment
    Returns:
    true if state transition must be performed
    Since:
    jcms-5.5.0

    createWFNote

    public boolean createWFNote(Member mbr,
                                int newPstatus,
                                int oldPstatus,
                                String note)
    Create/Update a WFNote and check if the transition can be performed.

    Parameters:
    mbr - the member which performe this operation
    newPstatus - new pstatus
    oldPstatus - old pstatus
    note - member's comment
    Returns:
    true if state transition must be performed
    Since:
    jcms-6.1.3

    getTitleComparator

    public static <T extends Publication> Comparator<T> getTitleComparator()
    Returns:
    a new instance of Publication.TitleComparator.

    getTitleComparator

    public static <T extends Publication> Comparator<T> getTitleComparator(String lang)
    Parameters:
    lang - the user language
    Returns:
    a new instance of Publication.TitleComparator using the given language.
    Since:
    jcms-4.0

    getRatingComparator

    public static <T extends Publication> Comparator<T> getRatingComparator()
    Returns:
    a new instance of Publication.RatingComparator.

    getReviewCountComparator

    public static <T extends Publication> Comparator<T> getReviewCountComparator()
    Returns:
    a new instance of Publication.ReviewCountComparator.

    getPdateComparator

    public static <T extends Publication> Comparator<T> getPdateComparator()
    Returns:
    a new instance of Publication.PdateComparator.
    Since:
    jcms-2.1

    getEdateComparator

    public static <T extends Publication> Comparator<T> getEdateComparator()
    Returns:
    a new instance of Publication.EdateComparator.
    Since:
    jcms-2.1

    getSdateComparator

    public static <T extends Publication> Comparator<T> getSdateComparator()
    Returns:
    a new instance of Publication.SdateComparator.
    Since:
    jcms-4.0

    getAdateComparator

    public static <T extends Publication> Comparator<T> getAdateComparator()
    Returns:
    a new instance of Publication.AdateComparator.
    Since:
    jcms-4.1.1

    getUdateComparator

    public static <T extends Publication> Comparator<T> getUdateComparator()
    Returns:
    a new instance of Publication.UdateComparator.
    Since:
    jcms-5.7.0

    getDdateComparator

    public static <T extends Publication> Comparator<T> getDdateComparator()
    Returns:
    a new instance of Publication.DdateComparator.
    Since:
    jcms-5.5.0

    getWorkspaceComparator

    public static <T extends Publication> Comparator<T> getWorkspaceComparator(String lang)
    Parameters:
    lang - the user language
    Returns:
    a new instance of Publication.WorkspaceComparator.
    Since:
    jcms-5.6.1

    getPstatusComparator

    public static <T extends Publication> Comparator<T> getPstatusComparator()
    Returns:
    a new instance of Publication.PstatusComparator.
    Since:
    jcms-2.1

    getRightComparator

    public static <T extends Publication> Comparator<T> getRightComparator()
    Returns:
    a new instance of Publication.RightComparator.
    Since:
    jcms-2.1

    getAudienceRightComparator

    public static <T extends Publication> Comparator<T> getAudienceRightComparator()
    Returns:
    a new instance of Publication.AudienceRightComparator.
    Since:
    jcms-5.5.0

    getTypeComparator

    public static <T extends Publication> Comparator<T> getTypeComparator()
    Returns:
    a new instance of Publication.TypeComparator.
    Since:
    jcms-2.1

    getReaderComparator

    public static <T extends Publication> Comparator<T> getReaderComparator()
    Returns:
    a new instance of Publication.ReaderComparator.
    Since:
    jcms-4.0.2

    getComparator

    public static Comparator getComparator(String str,
                                           boolean reverse)
    Retrieves a new Comparator given a name representing it. The returned comparator can be used to sort any Collection containing Publications.

    You can specify any of the following value:
  • "title": getTitleComparator()
  • "rating": getRatingComparator()
  • "workspace": getWorkspaceComparator(String)
  • "reviewCount": getReviewCountComparator()
  • "pstatus": getPstatusComparator()
  • "right": getRightComparator()
  • "audienceRight": getAudienceRightComparator()
  • "type": getTypeComparator()
  • "pdate": getPdateComparator()
  • "edate": getEdateComparator()
  • "sdate": getSdateComparator()
  • "adate": getAdateComparator()
  • "udate": getUdateComparator()
  • "ddate": getDdateComparator()
  • "reader": getReaderComparator()

  • And also any of the value available through Data.getComparator(String, boolean)

    Parameters:
    str - a string representing the comparator
    reverse - a boolean indicating whether the comparator should have its behavior reversed (true) or unchanged (false)
    Returns:
    a new instance of Comparator.
    See Also:
    Data.getComparator(String, boolean)

    getComparator

    public static <T extends Publication> Comparator<T> getComparator(Class<T> clazz,
                                                                      String str,
                                                                      boolean reverse)

    getComparator

    public static Comparator getComparator(String str,
                                           boolean reverse,
                                           QueryResultSet queryResultSet)
    Retrieves a new Comparator given a name representing it. The returned comparator can be used to sort any Collection containing Publications.

    This method add the following possible value to the behavior of getComparator(String, boolean)
  • "relevance": QueryResultSet.getScoreComparator(QueryResultSet, Comparator) with the givenqueryResultSet and BasicStorable.getMdateComparator()
  • Returns:
    a new instance of the Comparator to use when returning a SortedSet.
    Since:
    jcms-5.5.0
    See Also:
    getComparator(String, boolean), Data.getComparator(String, boolean)

    getDate

    public Date getDate(String dateType)
    Return the date corresponding to the given parameter : date/cdate, mdate, edate, pdate, sdate, adate, udate or null if nothing match or the matching date is null.

    Overrides:
    getDate in class Data
    Parameters:
    dateType - the date type
    Returns:
    the date
    Since:
    jcms-4.0

    getDate

    public Date getDate(String dateType,
                        Date defaultDate)
    Return the date corresponding to the given parameter : date/cdate, mdate, edate, pdate, sdate, adate, udate, or null if nothing match or the matching date is null.

    Overrides:
    getDate in class Data
    Parameters:
    dateType - the date type
    defaultDate - the default date
    Returns:
    the date
    Since:
    jcms-4.0

    getIndexingDate

    public Date getIndexingDate()
    Retrieve the Date at which this Publication was indexed in its search engine.

    Returns:
    a Date or null if was not indexed.
    Since:
    jcms-6.0.1

    getAuthorizedSelector

    public static Publication.AuthorizedSelector getAuthorizedSelector(Member member)
    Returns:
    a new instance of Publication.AuthorizedSelector using the given Member.
    Since:
    jcms-2.1

    getCanWorkOnSelector

    public static Publication.CanWorkOnSelector getCanWorkOnSelector(Member member)
    Returns:
    a new instance of Publication.CanWorkOnSelector using the given Member.
    Since:
    jcms-4.0.2

    getWorkspaceSelector

    public static Publication.WorkspaceSelector getWorkspaceSelector(Workspace workspace)
    Returns:
    a new instance of Publication.WorkspaceAuthorSelector using the given Workspace.
    Since:
    jcms-4.0.2

    getWorkspaceAuthorSelector

    public static Publication.WorkspaceAuthorSelector getWorkspaceAuthorSelector(Workspace workspace,
                                                                                 Member author)
    Returns:
    a new instance of Publication.WorkspaceAuthorSelector using the given Workspace and Member.
    Since:
    jcms-5.0.0

    getVisibleStateSelector

    public static Publication.VisibleStateSelector getVisibleStateSelector()
    Returns:
    a new instance of Publication.VisibleStateSelector.
    Since:
    jcms-4.1.1

    getPstatusSelector

    public static Publication.PstatusSelector getPstatusSelector(int pstatus)
    Returns:
    a new instance of Publication.PstatusSelector.
    Since:
    jcms-2.1
    See Also:
    Publication.PstatusSelector

    getPstatusSelector

    public static Publication.PstatusSelector getPstatusSelector(int pstatus,
                                                                 int greater)
    Returns:
    a new instance of Publication.PstatusSelector.
    Since:
    jcms-2.1
    See Also:
    Publication.PstatusSelector

    getPdateSelector

    public static Publication.PdateSelector getPdateSelector(Date begin,
                                                             Date end)
    Returns:
    a new instance of Publication.PdateSelector using the given begin and end Date.
    Since:
    jcms-2.1

    getSdateSelector

    public static Publication.SdateSelector getSdateSelector(Date begin,
                                                             Date end)
    Returns:
    a new instance of Publication.SdateSelector using the given begin and end Date.
    Since:
    jcms-4.1

    getEdateSelector

    public static Publication.EdateSelector getEdateSelector(Date begin,
                                                             Date end)
    Returns:
    a new instance of Publication.EdateSelector using the given begin and end Date.
    Since:
    jcms-2.1

    getAdateSelector

    public static Publication.AdateSelector getAdateSelector(Date begin,
                                                             Date end)
    Returns:
    a new instance of Publication.AdateSelector using the given begin and end Date.
    Since:
    jcms-4.1.1

    getUdateSelector

    public static Publication.UdateSelector getUdateSelector(Date begin,
                                                             Date end)
    Returns:
    a new instance of Publication.UdateSelector using the given begin and end Date.
    Since:
    jcms-4.1.1

    getDateSelector

    public static DataSelector getDateSelector(String str,
                                               Date begin,
                                               Date end)
    Retrieves a new DataSelector given a name representing it. The returned selector can be passed to the method JcmsUtil.applyDataSelector(java.util.Collection, DataSelector) to allow precise control over the selection of Data in a Collection.

    You can specify any of the following value:
  • "pdate": getPdateSelector(Date begin, Date end)
  • "sdate": getSdateSelector(Date begin, Date end)
  • "edate": getEdateSelector(Date begin, Date end)
  • "adate": getAdateSelector(Date begin, Date end)
  • "udate": getUdateSelector(Date begin, Date end)

  • And also any of the value available through Data.getDateSelector(String, Date, Date)

    Parameters:
    str - a string representing the selector
    begin - the begin Date to use for selection
    end - the end Date to use for selection
    Returns:
    a new instance of Comparator.
    See Also:
    Data.getDateSelector(String, Date, Date)

    getTrackedSelector

    public static Publication.TrackedSelector getTrackedSelector()
    Returns:
    a new instance of Publication.TrackedSelector.
    Since:
    jcms-5.0.0

    getAudienceRightSelector

    public static Publication.AudienceRightSelector getAudienceRightSelector()
    Returns:
    a new instance of Publication.AudienceRightSelector.
    Since:
    jcms-5.5.0

    getReadRightSelector

    public static Publication.ReadRightSelector getReadRightSelector()
    Returns:
    a new instance of Publication.ReadRightSelector.
    Since:
    jcms-5.5.0

    getTreeChildren

    public Collection<? extends TreeNode> getTreeChildren()
    Description copied from interface: TreeNode
    Returns a Collection of TreeNode children of the current node

    Specified by:
    getTreeChildren in interface TreeNode
    Returns:
    Collection of TreeNode
    See Also:
    TreeNode.getTreeChildren()

    getTreeParent

    public TreeNode getTreeParent()
    Description copied from interface: TreeNode
    Returns parent of the current node

    Specified by:
    getTreeParent in interface TreeNode
    Returns:
    TreeNode parent Node
    See Also:
    TreeNode.getTreeParent()

    isTreeLeaf

    public boolean isTreeLeaf()
    Description copied from interface: TreeNode
    Returns boolean true if the TreeNode is a leaf

    Specified by:
    isTreeLeaf in interface TreeNode
    Returns:
    boolean indicating if node is leaf or node
    See Also:
    TreeNode.isTreeLeaf()

    isTreeNode

    public boolean isTreeNode()
    Description copied from interface: TreeNode
    Returns boolean true if the TreeNode is a node

    Specified by:
    isTreeNode in interface TreeNode
    Returns:
    boolean indicating if node is leaf or node
    See Also:
    TreeNode.isTreeNode()

    getTreeRoot

    public TreeNode getTreeRoot()
    Description copied from interface: TreeNode
    Returns the root of the current node

    Specified by:
    getTreeRoot in interface TreeNode
    Returns:
    TreeNode root Node

    checkIntegrity

    public ControllerStatus checkIntegrity()
    Checks whether or not data integrity constraints are respected.

    Overrides:
    checkIntegrity in class Data
    Returns:
    a ControllerStatus
    Since:
    jcms-5.0.0

    checkWrite

    public ControllerStatus checkWrite(int op,
                                       Member mbr,
                                       boolean checkIntegrity,
                                       Map context)
    Checks if the given write operation can be performed

    Overrides:
    checkWrite in class Data
    Parameters:
    op - the operation (OP_CREATE, OP_UPDATE, ...)
    mbr - the member which requests the write operation
    checkIntegrity - if true, requires the constraints integrity to be checked
    context - a map which contains context parameters (may be null)
    Returns:
    a ControllerStatus
    Since:
    jcms-5.0.0

    checkMember

    public ControllerStatus checkMember(int op,
                                        Member mbr,
                                        Map context)
    Checks if the given member can perform the given operation.

    Overrides:
    checkMember in class Data
    Parameters:
    op - the operation (OP_CREATE, OP_UPDATE, ...)
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Returns:
    a ControllerStatus
    Since:
    jcms-5.0.0

    checkCreate

    public ControllerStatus checkCreate(Member mbr,
                                        Map context)
    Checks if the creation can be performed

    Overrides:
    checkCreate in class Data
    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Returns:
    a ControllerStatus
    Since:
    jcms-5.0.0

    checkUpdate

    public ControllerStatus checkUpdate(Member mbr,
                                        Map context)
    Checks if the update can be performed

    Overrides:
    checkUpdate in class Data
    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Returns:
    a ControllerStatus
    Since:
    jcms-5.0.0

    checkDelete

    public ControllerStatus checkDelete(Member mbr,
                                        Map context)
    Checks if the deletion can be performed

    Overrides:
    checkDelete in class Data
    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Returns:
    a ControllerStatus
    Since:
    jcms-5.0.0

    checkMerge

    public ControllerStatus checkMerge(Member mbr,
                                       Map context)
    Checks if the merge can be performed

    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Returns:
    a ControllerStatus
    Since:
    jcms-5.0.0

    performCreate

    public void performCreate(Member mbr,
                              Map context)
    Performs data creation

    Overrides:
    performCreate in class Data
    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Since:
    jcms-5.0.0

    performUpdate

    public void performUpdate(Member mbr,
                              Map context)
    Performs data update

    Overrides:
    performUpdate in class Data
    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Since:
    jcms-5.0.0

    performDelete

    public void performDelete(Member mbr,
                              Map context)
    Performs data deletion

    Overrides:
    performDelete in class Data
    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Since:
    jcms-5.0.0

    prepareMergeCopy

    protected Publication prepareMergeCopy()

    performMerge

    public void performMerge(Member mbr)
    Performs publication merge

    Parameters:
    mbr - the member which requests the write operation
    Since:
    jcms-5.0.0

    performMerge

    public void performMerge(Member mbr,
                             Map context)
    Performs publication merge

    Parameters:
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)
    Since:
    jcms-5.0.0

    getDBDataRevision

    public DBDataRevision getDBDataRevision(Data data,
                                            int op)

    performBeforeWrite

    protected void performBeforeWrite(int op,
                                      Member mbr,
                                      Map context)
    Description copied from class: Data
    Called to perform some action before the write.

    Overrides:
    performBeforeWrite in class Data
    Parameters:
    op - the operation (OP_CREATE, OP_UPDATE, ...)
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)

    performAfterWrite

    protected void performAfterWrite(int op,
                                     Member mbr,
                                     Map context)
    Description copied from class: Data
    Called to perform some action after the write.

    Overrides:
    performAfterWrite in class Data
    Parameters:
    op - the operation (OP_CREATE, OP_UPDATE, ...)
    mbr - the member which requests the write operation
    context - a map which contains context parameters (may be null)

    getFieldValue

    public Object getFieldValue(String fieldName,
                                String lang,
                                boolean useDefault)
                         throws NoSuchFieldException
    Gets the value of the given Object field name for the current Data.
    If the field is multilingual, the given language will be used.
    Do not retrieve Category fields, see #getCategoryFieldValue(String, Member).

    Overrides:
    getFieldValue in class Data
    Parameters:
    fieldName - the field name from which to retrieve the field value.
    lang - the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).
    useDefault - whether to use the publication main language if the field value is not available in the requested language (used only for multilingual fields).
    Returns:
    the Object field value
    Throws:
    NoSuchFieldException - if the field was not found in the given Data.

    setFieldValue

    public void setFieldValue(String fieldName,
                              Object value,
                              String lang)
                       throws NoSuchFieldException
    Sets the value of the given Object field name for the current Data.
    If the field is multilingual, the given language will be used.
    Do not retrieve Category fields, see #getCategoryFieldValue(String, Member).

    Overrides:
    setFieldValue in class Data
    Parameters:
    fieldName - the field name from which to retrieve the field value.
    value - whether to use the publication main language if the field value is not available in the requested language (used only for multilingual fields).
    lang - the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).
    Throws:
    NoSuchFieldException - if the field was not found in the given Data.
    Since:
    jcms-7.0.0

    assignCommonPublicationFields

    public void assignCommonPublicationFields(Publication pub)
    Assign all the common fields (author, workspace, pstatus, pdate, ...) of this publication from the given one.

    As of current implementation, the following fields are copied :

    Parameters:
    pub - the publication to copy from.
    Since:
    jcms-5.7.2

    getImportVersion

    public String getImportVersion()
    Get the value of importVersion.

    Returns:
    Value of importVersion.
    Since:
    jcms-5.7.2

    setImportVersion

    public void setImportVersion(String v)
    Set the value of importVersion.

    Parameters:
    v - Value to assign to importVersion.
    Since:
    jcms-5.7.2

    getWFNoteList

    public List<WFNote> getWFNoteList()
    Returns the list of WFNote bound to this publication.

    Returns:
    the list of WFNote bound to this publication.
    Since:
    jcms-6.0.0

    getWorkspaceId

    public String getWorkspaceId()
    Returns the JStore ID of the workspace (only for DBData)

    Returns:
    the JStore ID of the workspace (only for DBData)
    Since:
    jcms-6.0.0

    setWorkspaceId

    public void setWorkspaceId(String v)
    Sets the JStore ID of the workspace (only for DBData)

    Parameters:
    v - the JStore workspace id
    Since:
    jcms-6.0.0

    initializeDBDataCollections

    public void initializeDBDataCollections()
    Description copied from class: Data
    This methods force the collections of the DBData to be initialized()

    Overrides:
    initializeDBDataCollections in class Data

    cloneDBDataCollections

    public void cloneDBDataCollections()


    Copyright © 2001-2010 Jalios SA. All Rights Reserved.