Class Publication
- java.lang.Object
-
- com.jalios.jstore.BasicStorable
-
- com.jalios.jcms.Data
-
- com.jalios.jcms.Publication
-
- All Implemented Interfaces:
EditableData,JcmsConstants,ImportConstants,MashupConstants,Searchable,Storable,JaliosConstants,LangPropertyArgument,TreeNode,java.lang.Cloneable,java.lang.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.- Author:
- Olivier Dedieu
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPublication.AdateComparator<T extends Publication>Compares two Publications using their Adate in descending order (newest date first).static classPublication.AdateSelectorAdateSelector selects all the publications with a adate in a given rangestatic classPublication.AudienceRightComparator<T extends Publication>Comparator to compare Publication using their audience rights.static classPublication.AudienceRightSelectorAudienceRightSelector selects all publications being audienced.static classPublication.AuthorComparator<T extends Publication>static classPublication.AuthorizedSelectorAuthorizedSelector selects all the publications a member is authorized to read.static classPublication.CanWorkOnSelectorCanWorkOnSelector selects all the publications a member can work on.static classPublication.DdateComparator<T extends Publication>Compares two Publications using their Ddate in descending order (newest date first).static classPublication.EdateComparator<T extends Publication>Compares two Publications using their Edate in descending order (newest date first).static classPublication.EdateSelectorEdateSelector selects all the publications with a edate in a given rangestatic classPublication.PdateComparator<T extends Publication>Compares two Publications using their Pdate in descending order (newest date first).static classPublication.PdateSelectorPdateSelector selects all the publications with a pdate in a given rangestatic classPublication.PopularityComparator<T extends Publication>Comparator to compare Publication using their score based on votesstatic classPublication.PstatusComparator<T extends Publication>static classPublication.PstatusSelectorPstatusSelector selects all the publications with a given pstatus.static classPublication.ReaderComparator<T extends Publication>static classPublication.ReadRightSelectorReadRightSelector selects all publications which have any read right.static classPublication.RelatedCategoryComparator<T extends Publication>Publication are sorted according the count of common categories with the given category set.static classPublication.RightComparator<T extends Publication>static classPublication.SdateComparator<T extends Publication>Compares two Publications using their Sdate in descending order (newest date first).static classPublication.SdateSelectorSdateSelector select all the publications with a sdate in a given rangestatic classPublication.TitleComparator<T extends Publication>static classPublication.TrackedSelectorTrackedSelector selects all the publications which are tracked.static classPublication.TypeComparator<T extends Publication>static classPublication.UdateComparator<T extends Publication>Compares two Publications using their udate in descending order (newest date first).static classPublication.UdateSelectorUdateSelector selects all the publications with a udate in a given rangestatic classPublication.UserContentSelectorUserContentSelector selects all publications which are UGC (UserContent).static classPublication.VisibleStateSelectorVisibleStateSelector selects all the publications which are in a visible statestatic classPublication.VoteScoreComparator<T extends Publication>Comparator to compare Publication using their score based the score of votes (positive votes - negative votes)static classPublication.WorkspaceAuthorSelectorWorkspaceAuthorSelector selects all the publication the given member is the author and which belong to the given workspace.static classPublication.WorkspaceComparator<T extends Publication>static classPublication.WorkspaceSelectorWorkspaceSelector 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
Fields Modifier and Type Field Description static java.lang.StringACL_CAN_ATTACH_WSprotected java.util.Dateadateprotected java.util.Set<Workspace>attachWorkspaceSetprotected static java.lang.StringATTACHWS_CHECK_PUB_RIGHTS_PROPprotected java.util.TreeSet<Group>authorizedGroupSetprotected java.util.TreeSet<Member>authorizedMemberSetprotected java.util.HashSet<java.lang.String>authorizedMemberSetDBIDprotected Category[]categoriesprotected java.util.TreeSet<Category>categorySetprotected intclassificationLevelstatic intCTRL_TOPIC_ADVANCEDstatic intCTRL_TOPIC_CATEGORIESstatic intCTRL_TOPIC_WORKFLOWstatic java.lang.StringCTX_PSTATUS_UPDATEprotected java.util.Set<java.lang.String>dbFriendlyURLSetprotected booleandbFriendlyURLSetInitprotected java.util.Dateedateprotected booleanextendedReadRightsDBDataprotected java.util.TreeSet<java.lang.String>friendlyURLSetprotected booleanhasAttachWSprotected booleanhasNoReadRightsDBDataprotected booleanhasNoReadRightsDBDataInitializedprotected static PublicationIndexManagerindexMgrprotected booleanisTrackedprotected PublicationmainInstanceprotected java.lang.StringmainInstanceIdprotected java.lang.StringmainLanguageprotected intmajorVersionprotected java.util.DatemergeDateprotected java.lang.StringmergeIdprotected intminorVersionprotected java.util.Datepdateprotected intpstatusstatic java.lang.StringPUBLICATION_WFNOTEprotected booleanreadAckprotected intreaderCountprotected booleanrestrictUpdateRightsprotected java.util.HashMap<java.lang.String,java.util.TreeSet<Member>>roleMapprotected java.util.Datesdateprotected static java.lang.StringSYNC_ATTACH_WORKSPACE_MEDIA_ENABLED_PROPprotected java.lang.String[]templatesprotected java.lang.Stringtitleprotected java.util.HashMap<java.lang.String,java.lang.String>titleMLprotected java.util.Dateudateprotected java.util.TreeSet<Group>updateGroupSetprotected java.util.TreeSet<Member>updateMemberSetprotected intvoteCountprotected intvoteScoreprotected java.lang.StringweakDataImageprotected AlarmEntrywfExpressAlarmEntryprotected AlarmEntrywfReminderAlarmEntryprotected java.lang.StringworkflowIdprotected Workspaceworkspaceprotected java.lang.StringworkspaceId-
Fields inherited from class com.jalios.jcms.Data
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, opAuthor, opDelegate, WRITE_IN_PROGRESS_EXTRA_INFO, WYSIWYG_INLINE_EDIT_REQUEST_PARAMETER
-
Fields inherited from class com.jalios.jstore.BasicStorable
cdate, ddate, id, isStoreCache, 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.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
-
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, AJAX_MODE_ATTR, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, CLASS_PROPERTY, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, COUNTRY_SPRITE, CS_TYPOLOGY_ROOT_CAT_VID, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DATA_DIRECTORY, DEFAULT_PHOTO_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, GLYPH_ICON_PREFIX, ICON_ARCHIVE, ICON_ICON_PREFIX, ICON_LOCK, ICON_LOCK_STRONG, ICON_PREFIX_PROP, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, IS_IN_FRONT_OFFICE, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JCMS_TOASTR_COLLECTION, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LANG_SPRITE, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, ORGANIZATION_ROOT_GROUP_PROP, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_PROP_PREFIX, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_PROP_PREFIX, PHOTO_LARGE_WIDTH, PHOTO_MINI, PHOTO_MINI_HEIGHT, PHOTO_MINI_PROP_PREFIX, PHOTO_MINI_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_PROP_PREFIX, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_PROP_PREFIX, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_PROP_PREFIX, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, RAW_CONTENT_ICON_PREFIX, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SECURITY_LOG_FILE, SESSION_AUTHORIZED_FILENAMES_SET, SPRITE_ICON_PREFIX, STATS_REPORT_DIR, STATUS_PROP, STORE_DIR, STORE_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TTCARD_MEDIA_HEIGHT, TTCARD_MEDIA_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, UPLOAD_PERMISSION_COUNT_PROP_PREFIX, UPLOAD_PERMISSION_SIZE_PROP_PREFIX, URL_REGEXP, VID_LOGGED_MEMBER, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
-
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
-
-
Constructor Summary
Constructors Constructor Description Publication()Publication(Publication other)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidackRead(Member mbr)Confirm the read of this publication by the given member.voidaddAuthorizedGroup(Group grp)Add an authorized groupvoidaddAuthorizedMember(Member mbr)Add an authorized member.voidaddCategory(Category cat)Add the given category to the categories of this publicationvoidaddFollower(Member mbr)Adds a follower for this publication.voidaddWeakReferrer(Publication referrer)Add a weak referrer.voidaddWFExpressAlarm()Adds a WFExpress alarm for this publication (only for main leader replica).voidaddWFReminderAlarm()Adds a WFReminder alarm for this publication (only for main leader replica).voidassignCommonPublicationFields(Publication pub)Assign all the common fields (author, workspace, pstatus, pdate, ...) of this publication from the given one.voidassignRole(java.lang.String roleId, Member mbr)Assigns a member to a rolevoidassignRole(java.lang.String roleId, java.util.TreeSet<Member> mbrSet)booleanattachPublication(java.lang.String fieldName, Publication attachment)Attaches the given publication to the given field of this publication.ControllerStatusattachTo(Workspace attachWorkspace, java.util.Set<Category> catSet, Member mbr)Attaches this publication to the given workspace with the given categories.booleancanBeArchived(Member mbr)Check if the publication can be archived by the given member.ControllerStatuscanBeArchived(Member mbr, java.util.Map context)Returns a ControllerStatus indicating if this publication can be archived or notbooleancanBeAttachedBy(Member mbr)Returns true if the given member can attach this publication to another workspace.booleancanBeAttachedTo(Workspace attachWorkspace, Member mbr)Returns true if the given member can attach this publication to the given workspace.booleancanBeDetachedFrom(Workspace attachWorkspace, Member mbr)Returns true if the given member can detach this publication from the given workspace.booleancanBeEditedFieldByField(Member mbr)Returns true if this publication can be edited field by field on the front-office by the given member.booleancanBeFollowedBy(Member mbr)Returns true if the given member can follow this publicationbooleancanBeReadBy(Group group)Deprecated.since JCMS-8577booleancanBeReadBy(Group group, RightInfo rightInfo)Deprecated.since JCMS-8577booleancanBeReadBy(Member member, boolean searchInGroups)Check if a member can read this publication.booleancanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)Checks if the specified member is authorized to read this Publication.booleancanBeVotedBy(Member mbr)booleancanCreateCopy(Member mbr)Returns true if the given member can create a copy of this publicationbooleancanCreateCopy(Member mbr, boolean isWorkCopy)Returns true if the given member can create a copy of this publicationbooleancanCreateCopy(Member mbr, Workspace targetWorkspace)Returns true if the given member can create a copy of this publicationbooleancanCreateWorkCopy(Member mbr)Returns true if the given member can create a work copy of this publicationbooleancanMergeWorkCopy(Member mbr)Returns true if the given member can merge this work copy with it's main instancebooleancanRequestUnlock(Member mbr)Returns true if the given member can request to unlock this data.ControllerStatuscheckAndPerformTrash(Member opAuthor, java.util.Map context)Check if publication can be put in trash, and do it if possible and authorized.ControllerStatuscheckAndPerformUntrash(Member opAuthor, java.util.Map context)Check if publication can be removed from trash, and do it if possible and authorized.ControllerStatuscheckCreate(Member mbr, java.util.Map context)Checks if the creation can be performedControllerStatuscheckDelete(Member mbr, java.util.Map context)Checks if the deletion can be performedControllerStatuscheckIntegrity()Checks whether or not data integrity constraints are respected.booleancheckLang(java.lang.String lang)Check if the publication is available for the given language.ControllerStatuscheckMember(int op, Member mbr, java.util.Map context)Checks if the given member can perform the given operation.ControllerStatuscheckMerge(Member mbr, java.util.Map context)Checks if the merge can be performedjava.lang.Object[]checkStateChange(Member mbr, int newPstatus)Checks if the state change can be performed (it checks if the transition's rule can be perfomed)java.lang.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 booleancheckTemplateEntry(TypeTemplateEntry tte, java.lang.String usage, boolean devModeChecks, java.lang.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.ControllerStatuscheckTrash(Member opAuthor, java.util.Map context)Check this publication can be trashed given its current state and authorization of specified member.ControllerStatuscheckUntrash(Member opAuthor, java.util.Map context)Check this publication can be remove from trashed given its current state and authorization of specified member.ControllerStatuscheckUpdate(Member mbr, java.util.Map context)Checks if the update can be performedControllerStatuscheckWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)Checks if the given write operation can be performedprotected voidcleanHybridCollections()This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.voidclearTransientIndex()Clear all the transient fields that contains indexes.voidcloneDBDataCollections()java.lang.StringcomputeSignature()Deprecated.use #computeSignature(boolean, boolean)java.lang.StringcomputeSignature(boolean includePublicationFields, boolean hash)Compute the signature of this publication.booleancontainsCategory(Category category)This convenient method returns true if the publication contains a given category.PublicationcreateCopy(Member mbr)Creates a copy from this publicationPublicationcreateCopy(Member mbr, java.util.Map context)Creates a copy from this publicationbooleancreateWFNote(Member mbr, int newPstatus, int oldPstatus, java.lang.String note)Create/Update a WFNote and check if the transition can be performed.booleancreateWFNote(Member mbr, int newPstatus, java.lang.String note)Create/Update a WFNote and check if the transition can be performed.PublicationcreateWorkCopy(Member mbr)Creates a work copy for this publicationPublicationcreateWorkCopy(Member mbr, java.util.Map context)Creates a work copy for this publicationControllerStatusdetachFrom(Workspace attachWorkspace, Member mbr)Detaches this publication for the given attachWorkspace.voiddiscardCopy(Publication copy)This method is called when the creation of copy or a work copy of this publication has failed.voidexportXmlField(java.lang.StringBuffer sb, int indentLevel)Fills the given StringBuffer with Xml export of fields of this data.protected voidexportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)java.lang.StringgetAbstract()Returns the abstract of this publication in the channel's main language.java.lang.StringgetAbstract(java.lang.String lang)Returns the abstract of this publication.java.lang.StringgetAbstract(java.lang.String lang, boolean useDefault)Returns the abstract of this publication.java.lang.StringgetAbstractAsText(java.util.Locale locale)Returns the abstract as raw text (no html or wiki).java.util.HashMap<java.lang.String,java.lang.String>getAbstractML()Returns the map containing abstracts of this publication in all language but the channel's main language.intgetAccessCount()java.util.DategetAdate()Retrieve the archiving date of this publication.static <T extends Publication>
java.util.Comparator<T>getAdateComparator()static Publication.AdateSelectorgetAdateSelector(java.util.Date begin, java.util.Date end)java.util.Set<java.lang.String>getAllCatIdSet()Do not call this method.java.util.Set<java.lang.String>getAllFilePath()Gives the set of all relatives path to all kind (image, media) of files linked from the given publication.java.lang.StringgetAllWikiText()Returns a String which contains the concatenation of all the wiki fields.java.lang.StringgetAllWysiwygText()Returns a String which contains the concatenation of all the wysiwyg fields.java.util.Set<Workspace>getAttachWorkspaceSet()Returns the attachWorkspaceSetjava.util.Set<java.lang.String>getAttachWSIdSet()Do not call this method.java.lang.StringgetAudiencedRightsString(java.lang.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>
java.util.Comparator<T>getAudienceRightComparator()static Publication.AudienceRightSelectorgetAudienceRightSelector()java.util.Set<java.lang.String>getAuthGrpIdSet()Do not call this method.java.util.Set<java.lang.String>getAuthMbrIdSet()Do not call this method.java.util.Set<Group>getAuthorizedGroupSet()Get the set of Group authorized to read this Publication.java.util.Set<Member>getAuthorizedMemberSet()Get the set of Member and DBMember authorized to read this Publication.java.util.Set<Member>getAuthorizedMemberSet(boolean queryDB)Get the set of Member authorized to read this Publication.java.util.HashSet<java.lang.String>getAuthorizedMemberSetDBID()static Publication.AuthorizedSelectorgetAuthorizedSelector(Member member)static Publication.CanWorkOnSelectorgetCanWorkOnSelector(Member member)Category[]getCategories()Retrieve the categories of this publication.Category[]getCategories(Member member)Returns the categories of the publication the member can readjava.util.TreeSet<Category>getCategorySet()Returns the categories of this publication as a Set.java.util.Set<java.lang.String>getCatIdSet()Do not call this method.intgetClassificationLevel()Retrieve the classification level of this publication.static <T extends Publication>
java.util.Comparator<T>getComparator(java.lang.Class<T> clazz, java.lang.String str, boolean reverse)Deprecated.static java.util.ComparatorgetComparator(java.lang.String str, boolean reverse)Deprecated.static java.util.ComparatorgetComparator(java.lang.String str, boolean reverse, QueryResultSet queryResultSet)Deprecated.static java.lang.StringgetCSVHeader(java.lang.String lang)Returns the CSV header of this objectjava.util.Set<Member>getCurrentWorkerSet()Returns the Set of member which will be current workers on this state of workflow (empty set if no specific worker are available)java.lang.StringgetDataIcon()Returns source information for the icon associated to this Data, either a relative path or sprite classes name.java.lang.StringgetDataIconTitle(java.lang.String lang)Returns the icon's tooltip.java.lang.StringgetDataImage()Returns a data image of this publication based on the image contains in its wiki or wysiwyg fields.java.lang.StringgetDataName(java.lang.String language)Return the name of this Data, every sub class Data which will be displayed to user should implements this method already.java.util.DategetDate(java.lang.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.java.util.DategetDate(java.lang.String dateType, java.util.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 DataSelectorgetDateSelector(java.lang.String str, java.util.Date begin, java.util.Date end)Retrieves a newDataSelectorgiven a name representing it.DBDataRevisiongetDBDataRevision(Data data, int op)java.util.Set<java.lang.String>getDbFriendlyURLSet()static <T extends Publication>
java.util.Comparator<T>getDdateComparator()java.lang.StringgetDefaultTemplateUsage()Returns the default template usage used to display the publication.java.util.TreeSet<Category>getDescendantCategorySet(Category parent)Return the set of category of this publication which are the descendant category of a given parent category.java.util.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 parameterincludingParentis true.java.util.TreeSet<Category>getDescendantCategorySet(Category parent, boolean includingParent, Member member)Return the set of category of this publication which are descendant of given parent category, including the given parent category in case the parameterincludingParentis true.java.lang.StringgetDisplayTemplateFile()Deprecated.Must call instead getTemplatePath()java.util.Set<FileDocument>getDocumentLinkSet()Returns all the FileDocument instance (and subclass) targeted by this Publication through its link fields and through wiki and wysiwyg field.java.util.DategetEdate()Retrieve the expiration date of this publication.static <T extends Publication>
java.util.Comparator<T>getEdateComparator()static Publication.EdateSelectorgetEdateSelector(java.util.Date begin, java.util.Date end)intgetEffectiveClassificationLevel()Retrieve the effective classification level of this publication using baseline classification level configured on site.intgetEstimatedReminderCount()Returns an estimation of how many reminders have been sent since this publication is in this state.booleangetExtendedReadRights()Checks if this DB publication has been marked as having its read right potentially extended custom right policy.java.util.Set<java.lang.String>getExternalLinkSet()Returns all the external link contains in this publication.<T> TgetFieldInMainLanguage(T field, java.util.HashMap<java.lang.String,T> fieldML)Retrieve the value of the specified multilingual field in the main language of the publication.java.lang.ObjectgetFieldValue(java.lang.String fieldName, java.lang.String lang, boolean useDefault)Gets the value of the givenObjectfield name for the currentData.CategorygetFirstDescendantCategory(Category parent)This convenient method returns the first category of the set returned by getDescendantCategorySet.CategorygetFirstDescendantCategory(Category parent, boolean includingParent)This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameterincludingParentis true and the current publication hasparentas category.CategorygetFirstDescendantCategory(Category parent, boolean includingParent, Member member)This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameterincludingParentis true and the current publication hasparentas category.java.util.List<Member>getFollowerList(boolean searchParents)Returns all the followers of this publication.java.util.TreeSet<java.lang.String>getFriendlyURLSet()Get friendly urls Set.java.lang.StringgetGenericThumbnail()Returns a generic thumbnail for this Data.booleangetHasAttachWS()Returns true if this publication is attached to other workspaces.booleangetHasNoReadRights()Do not call this method.PublicationgetImportConflictCopy()Returns the conflict copy bound to this imported publication (or null if there is no conflict copy).java.lang.StringgetImportVersion()Get the value of importVersion.java.util.DategetIndexingDate()Retrieve the Date at which this Publication was indexed in its search engine.WorkflowgetInternalWorkflow()Returns the Workflow bound internaly to this publication<T extends Data>
java.util.TreeSet<T>getLinkDataSet(java.lang.Class<T> clazz)Returns all the data, instance of the specified class, targeted by this Publication through its link fields.PublicationgetMainInstance()If this publication is a work copy then return the main instancejava.lang.StringgetMainInstanceId()java.lang.StringgetMainLanguage()Get the value of main language.intgetMajorVersion()Returns the major version.java.util.TreeSet<Member>getMemberSetAssignedToRole(java.lang.String roleId)Returns the member bound to the given role.java.util.DategetMergeDate()Returns the date of the last merge with a work copy.java.lang.StringgetMergeId()Returns the id of the work copy used for the last merge.intgetMinorVersion()Returns the minor version.java.util.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.java.util.DategetPdate()Retrieve the publication date of this publication.static <T extends Publication>
java.util.Comparator<T>getPdateComparator()static Publication.PdateSelectorgetPdateSelector(java.util.Date begin, java.util.Date end)intgetPopularity()static <T extends Publication>
java.util.Comparator<T>getPopularityComparator()intgetPstatus()Get the value of pstatus.AlarmEntrygetPstatusAlarmEntry(int pstatus)Get the alarmEntry bound to a given pstatusstatic <T extends Publication>
java.util.Comparator<T>getPstatusComparator()static Publication.PstatusSelectorgetPstatusSelector(int pstatus)static Publication.PstatusSelectorgetPstatusSelector(int pstatus, int greater)java.lang.StringgetQueryTemplateFile()Deprecated.Must call instead getTemplatePath()booleangetReadAck()Returns true if read acknowledge is mandatory on this publication.intgetReadAckCount()Returns the count of member who confirm the reading of this publication.static <T extends Publication>
java.util.Comparator<T>getReaderComparator()intgetReaderCount()ReaderTrackergetReaderTracker(Member mbr)Returns the ReaderTracker for this publication and the given member.java.util.List<ReaderTracker>getReaderTrackerList()Returns the reader list for the given publication.static Publication.ReadRightSelectorgetReadRightSelector()java.lang.StringgetReadRightsString(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, ...")java.util.SetgetReferrerSet(boolean searchInDB)Returns the referrer set of this data.booleangetRestrictUpdateRights()Returns true if the update rights of this publication are restricted.static <T extends Publication>
java.util.Comparator<T>getRightComparator()java.util.HashMap<java.lang.String,java.util.TreeSet<Member>>getRoleMap()java.lang.StringgetRoleMapStr()Returns the encoded String from the current roleMap (only used for DBData property mapping)java.util.DategetSdate()Retrieve the sort date of this publication.static <T extends Publication>
java.util.Comparator<T>getSdateComparator()static Publication.SdateSelectorgetSdateSelector(java.util.Date begin, java.util.Date end)java.lang.String[]getSearchStrings()Searchable implementationjava.lang.StringgetTemplate(java.lang.String usage)Returns the template name for the given usageTypeTemplateEntrygetTemplateEntry(java.lang.String usage, boolean devModeChecks)Returns the TypeTemplateEntry matching the given parameters.static TypeTemplateEntrygetTemplateEntry(java.lang.String usage, boolean devModeChecks, java.lang.Class<? extends Data> clazz, Workspace ws)Returns the TypeTemplateEntry matching the given parameters.java.util.Set<TypeTemplateEntry>getTemplateEntrySet()Returns a Set of TypeTemplateEntry matching current publication templatesjava.lang.StringgetTemplatePath(JcmsJspContext ctxt)Returns the template path for the current contextjava.lang.StringgetTemplatePath(java.lang.String usage, boolean devModeChecks)Returns the template path for the given usagejava.lang.String[]getTemplates()Get the value of templates.java.lang.StringgetTitle()Retrieve the title of this publication in the main site language.java.lang.StringgetTitle(java.lang.String lang)Get the value of title bound to the given language.java.lang.StringgetTitle(java.lang.String lang, boolean useDefault)Get the value of title bound to the given language.static <T extends Publication>
java.util.Comparator<T>getTitleComparator()static <T extends Publication>
java.util.Comparator<T>getTitleComparator(java.lang.String lang)java.util.HashMap<java.lang.String,java.lang.String>getTitleML()Retrieve the HashMap containing the titles of this publication in language other than the main site language.java.lang.StringgetTitleMLE()Returns the encoded titleML.static Publication.TrackedSelectorgetTrackedSelector()java.util.Collection<? extends TreeNode>getTreeChildren()Returns a Collection of TreeNode children of the current nodeTreeNodegetTreeParent()Returns parent of the current nodeTreeNodegetTreeRoot()Returns the root of the current nodestatic <T extends Publication>
java.util.Comparator<T>getTypeComparator()java.lang.StringgetTypeFieldLabel(java.lang.String fieldName, java.lang.String lang)Returns the localized label of the given field of the given publication.java.lang.StringgetTypeLabel(java.lang.String lang)Returns the label of the type of this publication.java.util.DategetUdate()Returns the date of last major update.static <T extends Publication>
java.util.Comparator<T>getUdateComparator()static Publication.UdateSelectorgetUdateSelector(java.util.Date begin, java.util.Date end)java.util.Set<Group>getUpdateGroupSet()Get the set of Group authorized to update this Publication.java.util.Set<java.lang.String>getUpdateGrpIdSet()Do not call this method.java.util.Set<java.lang.String>getUpdateMbrIdSet()Do not call this method.java.util.Set<Member>getUpdateMemberSet()Get the set of Member authorized to update this Publication.java.lang.StringgetVersionString()Returns the current version (major.minor) of this publication.static Publication.VisibleStateSelectorgetVisibleStateSelector()intgetVoteCount()intgetVoteScore()static <T extends Publication>
java.util.Comparator<T>getVoteScoreComparator()intgetVoteValue()java.util.Set<Publication>getWeakReferrerSet()Returns the set of weak referrers.java.util.List<WFNote>getWFNoteList()Returns the list of WFNote bound to this publication.WFStategetWFState()Returns the WFState bound to the current pstatus or null if nonejava.lang.StringgetWFStateLabel(java.lang.String lang)This convenient method returns the Workflow's state label this publication is in.java.lang.StringgetWFStateLabelHtml(java.lang.String lang)This convenient method returns the HTML Workflow's state label this publication is in.java.util.Set<Publication>getWorkCopySet()Get the value of workCopySet.WorkflowgetWorkflow()Returns the Workflow bound to this publicationjava.lang.StringgetWorkflowId()Returns the internal workflow id if set (only worklow instance, not workflow associated with the publication class)WorkspacegetWorkspace()static Publication.WorkspaceAuthorSelectorgetWorkspaceAuthorSelector(Workspace workspace, Member author)static <T extends Publication>
java.util.Comparator<T>getWorkspaceComparator(java.lang.String lang)java.lang.StringgetWorkspaceId()Returns the JStore ID of the workspace (only for DBData)static Publication.WorkspaceSelectorgetWorkspaceSelector(Workspace workspace)WSTypeEntrygetWSTypeEntry()This method return a WSTypeEntry for the current workspace in the current class.WSTypeEntrygetWSTypeEntry(Workspace wrkspc)This method return a WSTypeEntry for the given workspace in the current class.booleanhasAlreadyVoted(Member member)Check if the given member has already voted for this publicationbooleanhasAnyReadRights()Tests if this publication has member or group read rights.booleanhasBeenReadAckBy(Member mbr)Returns true if the given member has confirmed the reading of this publication.booleanhasBeenReadBy(Member mbr)Check if the given member has read this publicationbooleanhasCategory(Category cat)Test if a publication references a given category.booleanhasImportConflict()Returns true if this imported publication has a conflict copy.booleanhasNoReadRights()Tests if this publication has NO member read rights AND NO group read rights.booleanhasWeakReferrers()Returns true if this publication has weak referrers.voidimportConvertToLocal(Member opAuthor)Converts this imported publication to a local datavoidimportMarkAsMerged(Member opAuthor)Merges all the import extra data (import date, import version, ....) of the most recent conflict copy with the original.voidimportOverrideAndUpdate(Member opAuthor)Ignores all the local changes and replaces the local imported data with the conflict copy.voidimportXml(org.jdom.Element elt, ImportOptions options)Fill this data with the values contains in the JDOM element.voidinit(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 opAuthorvoidinitCopy(Member newAuthor)Initialize this publication once it has been cloned for a copy (eg by duplicate.jsp)voidinitializeDBDataCollections()This methods force the collections of the DBData to be initialized()protected booleaninternalCanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)voidinvalidateWeakDataImage()booleanisAudienced()Check if this publication is Audienced.booleanisClassified()Check if this publication is classified.booleanisDefaultTemplate(java.lang.String usage)Checks if the publication use a default template for the given usagebooleanisFollowedBy(Member mbr)Returns true if the given member follows this publication.booleanisImportConflictCopy()Returns true if this publication is an import conflict copy.booleanisInRole(java.lang.String roleId, Member mbr)Determines whether the given member can use the given role for this publicationbooleanisInVisibleState()Returns true if this publication is in a visible statebooleanisPublic()Returns true is this publication can be read by any one.booleanisRoleAssigned(java.lang.String roleId)Determines whether there exists at least one member assigned to the given rolebooleanisTracked()Check if a the publication's readers are trackedbooleanisTrashed()booleanisTreeLeaf()Returns boolean true if the TreeNode is a leafbooleanisTreeNode()Returns boolean true if the TreeNode is a nodebooleanisUserContent()Returns true if this data is User Content.static booleanisUserContentType(java.lang.Class<?> clazz)Checks if the given class is a "User Content" That means a Publication not manage by JCMS workers.booleanisVersioned()Returns true if the current Publication is versioned (is stored or is instance of HistorizedDBData)booleanisVotable()booleanisWorkCopy()Checks if this publication is a working copy.voidmajorUpdate()Increments the major versionvoidnotifyFollowers(Member opAuthor, java.util.Map context)Notify all the follower of this publication.protected voidperformAfterWrite(int op, Member mbr, java.util.Map context)Called to perform some action after the write.protected voidperformBeforeWrite(int op, Member mbr, java.util.Map context)Called to perform some action before the write.voidperformCreate(Member mbr, java.util.Map context)Performs data creationvoidperformDelete(Member mbr, java.util.Map context)Performs data deletionvoidperformMerge(Member mbr)Performs publication mergevoidperformMerge(Member mbr, java.util.Map context)Performs publication mergevoidperformTrash(Member opAuthor, java.util.Map context)Put this put publication in the trash.voidperformUntrash(Member opAuthor, java.util.Map context)Remove this publication from the trash.voidperformUpdate(Member mbr, java.util.Map context)Performs data updateprotected voidprepareMergeCopy(Publication mergeCopy)voidputPstatusAlarmEntry(int pstatus, AlarmEntry alarmEntry)Bind an AlarmEntry to a given pstatusvoidrecomputeScore()Recompute the score of the publicationvoidremoveAllDescendants(Member opAuthor, java.util.Map context)Remove all descendant TreeNode that can be deletedvoidremoveAllFollowers()Removes all the follower for this publication.voidremoveAllReaderTracker(Member opAuthor)Remove all the readers notesbooleanremoveAuthorizedGroup(Group grp)Remove an authorized group.booleanremoveAuthorizedMember(Member mbr)Remove an authorized member.voidremoveCategory(Category cat)Remove the specified category from this publication's categoriesprotected voidremoveDataSet(Member opAuthor, java.util.Set<? extends Data> dataSet)Remove all the data of the given data setvoidremoveFollower(Member mbr)Removes the given follower for this publication.voidremoveImportMetadata()Remove all the import metadata on this publicationAlarmEntryremovePstatusAlarmEntry(int pstatus)Remove an AlarmEntry to a given pstatusvoidremoveWeakReferrer(Publication referrer)Remove a weak referrer.voidremoveWFExpressAlarm()Removes the WFExpress alarm for this publication.voidremoveWFReminderAlarm()Removes the WFExpress alarm for this publication.protected static TypeTemplateEntryresolveTypeTemplateEntry(WSTypeEntry wste, java.lang.String usage, java.lang.String[] templates)ReturnsTypeTemplateEntrymatching given parameters.voidsetAbstract(java.lang.String value)Set the value of the Abstract field in the main language (default site language or any other).voidsetAbstract(java.lang.String lang, java.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.voidsetAdate(java.util.Date v)Set the archiving date of this publication.voidsetAllCatIdSet(java.util.Set<java.lang.String> idSet)Do not call this method.voidsetAttachWorkspaceSet(java.util.Set<Workspace> attachWorkspaceSet)Set the attachWorkspaceSetvoidsetAttachWSIdSet(java.util.Set<java.lang.String> idSet)Do not call this method.voidsetAuthGrpIdSet(java.util.Set<java.lang.String> idSet)Do not call this method.voidsetAuthMbrIdSet(java.util.Set<java.lang.String> idSet)Do not call this method.voidsetAuthorizedGroupSet(java.util.TreeSet<Group> groupSet)Set the set of Group authorized to read this Publication.voidsetAuthorizedMemberSet(java.util.TreeSet<Member> memberSet)Set the set of Member authorized to read this Publication.voidsetAuthorizedMemberSetDBID(java.util.HashSet<java.lang.String> v)voidsetCategories(Category[] cats)Set categories of this publication.voidsetCategorySet(java.util.Set<Category> catSet)Replaces the current categories with this set of categories.voidsetCatIdSet(java.util.Set<java.lang.String> idSet)Do not call this method.voidsetCdate(java.util.Date cdate)Set the cdate and update the udatevoidsetClassificationLevel(java.lang.Integer level)Set the classification level of this publication.voidsetDbFriendlyURLSet(java.util.Set<java.lang.String> v)voidsetEdate(java.util.Date v)Set the expiration date of this publication.voidsetExtendedReadRights(java.lang.Boolean extendedRights)Indicate that this DB publication has its read rights potentially extended by a custom right policy.voidsetFieldValue(java.lang.String fieldName, java.lang.Object value, java.lang.String lang)Sets the value of the givenObjectfield name for the currentData.voidsetFriendlyURLSet(java.util.TreeSet<java.lang.String> v)voidsetHasAttachWS(java.lang.Boolean v)Do not call this method.voidsetHasNoReadRights(java.lang.Boolean b)Do not call this method.voidsetImportConflictCopy(boolean v)Set the value of isImportConflictCopy.voidsetImportVersion(java.lang.String v)Set the value of importVersion.voidsetMainInstance(Publication mainInstance)If this publication is a work copy then set it's main instancevoidsetMainInstanceId(java.lang.String v)voidsetMainLanguage(java.lang.String v)Set the value of main language.voidsetMajorVersion(int majorVersion)Set the major version.voidsetMergeDate(java.util.Date mergeDate)Set the date of the last merge with a work copyvoidsetMergeId(java.lang.String mergeId)Set the id of the work copy used for the last merge.voidsetMinorVersion(int minorVersion)Set the minor version.voidsetPdate(java.util.Date v)Set the publication date of this publication.voidsetPstatus(int v)Set the value of pstatus.voidsetReadAck(java.lang.Boolean v)If true, read acknowledge is mandatory on this publication.voidsetReaderCount(int v)Do not call this method.voidsetRestrictUpdateRights(java.lang.Boolean v)If true, restrict the update rights to the members declared in updateMemberSet and updateGroupSet.voidsetRoleMap(java.util.HashMap<java.lang.String,java.lang.Object> roleMap)voidsetRoleMapStr(java.lang.String str)Assigns the roleMap from the given encoded String (only used for DBData property mapping)voidsetRoleMemberSetMap(java.util.HashMap<java.lang.String,java.util.TreeSet<Member>> roleMap)voidsetSdate(java.util.Date v)Set the sort date of this publication.voidsetTemplate(java.lang.String name)voidsetTemplates(java.lang.String[] v)Set the value of templates.voidsetTitle(java.lang.String v)Set the title of this publication in the main site language.voidsetTitle(java.lang.String lang, java.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)orsetTitleML(HashMap)) depending on the specified language.voidsetTitleML(java.util.HashMap<java.lang.String,java.lang.String> v)Set the HashMap containing the titles of this publication in language other than the main site language.voidsetTitleMLE(java.lang.String v)Set the value for the encoded titleMLvoidsetTracked(boolean bool)Set the track flagvoidsetUdate(java.util.Date udate)Set the date of last major update.voidsetUpdateGroupSet(java.util.TreeSet<Group> groupSet)Set the Groups whose members are explicitely authorized to update this instance.voidsetUpdateGrpIdSet(java.util.Set<java.lang.String> idSet)Do not call this method.voidsetUpdateMbrIdSet(java.util.Set<java.lang.String> idSet)Do not call this method.voidsetUpdateMemberSet(java.util.TreeSet<Member> memberSet)Set the Members explicitely authorized to update this instance.voidsetVoteCount(java.lang.Integer voteCount)voidsetVoteScore(java.lang.Integer voteScore)voidsetWorkflow(Workflow workflow)voidsetWorkflowId(java.lang.String wfId)Set the internal workflow id (if the id is null, workflow will be workflow associated with publication class)voidsetWorkspace(Workspace workspace)voidsetWorkspaceId(java.lang.String v)Sets the JStore ID of the workspace (only for DBData)protected voidsplitHybridCollections(Data previousData)This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.booleansupportsClassification()Check if this publication supports being classified.java.lang.StringtoCSV(java.lang.String lang)Returns a CSV view of this objectjava.lang.StringtoFullString()java.lang.StringtoString()voidtrackReader(Member mbr)Track the given reader.voidtrackReader(Member mbr, int accessType)Track the given reader for given access type.voidunassignMember(Member mbr)Unassign a member from all the role he has been assigned to.voidunassignRole(java.lang.String roleId)Unassigns a member to a rolejava.lang.StringBuilderupdateDisplayLinkCss(java.lang.StringBuilder builder)Returns a StringBuilder which contains css, whom you can modify or replace in your subclassesDataAttributeupdateDisplayLinkDataAttribute(DataAttribute dataAttribute)Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclassesvoidupdatePstatus(Member author, int newPstatus, java.lang.String note)Change the pstatus of this publication, store it and generate a WFNoteprotected java.lang.String[]updateTemplate(java.lang.String name, java.lang.String[] templates)-
Methods inherited from class com.jalios.jcms.Data
canBeReadBy, canBeUnlockedBy, checkAndPerformCreate, checkAndPerformCreate, checkAndPerformDelete, checkAndPerformDelete, checkAndPerformUpdate, checkAndPerformUpdate, checkCreate, checkDelete, checkIntegrity, checkLockMember, checkStrongLockMember, checkStrongLockMember, checkUpdate, cleanHybridCollection, cleanHybridCollection, cleanHybridCollection, clone, computeDBIDArray, computeDBIDList, computeDBIDSet, exportXml, exportXml, exportXml, exportXml, exportXmlRelated, fillExportXmlFieldAttributes, getAllReferrerSet, getAllReferrerSet, getAllTypeFieldEntry, getAuthor, getAuthor, getAuthorComparator, getAuthorDBID, getAuthorId, getAuthorSelector, getBooleanFieldValue, getBooleanFieldValue, getCaddyComparator, getCategoryFieldValue, getCategoryFieldValue, getCdateSelector, getDataIconAlt, getDataIconCSS, getDataIconHtml, getDataIconHtml, getDataImage, getDataImage, getDataNameComparator, getDeletableSelector, getDisplayLink, getDisplayLink, getDisplayLink, getDisplayLinkCss, getDisplayLinkDataAttribute, getDisplayLinkHtmlAttributes, 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, getLangPropertyValue, getLinkCount, getLinkIndexedDataSet, getLinkIndexedDataSet, getLockDate, getLockInfo, getLockMember, getLongFieldValue, getLongFieldValue, getMdateSelector, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getOpAuthor, getOpAuthorComparator, getOpAuthorId, getOpDelegate, getReadAuthorizedSelector, getReferrerSet, getRowId, getRowIdComparator, getStrongLock, getStrongLockContext, getStrongLockContextData, getStrongLockDate, getStrongLockInfo, getStrongLockMember, getStrongLockSelector, getTypeEntry, getTypeFieldsEntries, getUpdateInstance, getVirtualIDSet, importXmlFieldsWithReferences, importXmlFiles, importXmlReferences, isDBData, isImported, isImportUpdated, isInDatabase, isLocked, isPersisted, isStrongLocked, lock, markNewImport, mergeHybridLink, mergeHybridLink, performCreate, performDelete, performUpdate, prepareUpdateContext, printDataName, printDisplayLinkEnd, printDisplayLinkStart, printDisplayLinkStart, printDisplayUrl, printDisplayUrl, putStrongLock, 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, setOpAuthorId, setOpDelegate, setRowId, unlock, unlock, unmarkNewImport, updateDisplayLinkHtmlAttributes, 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, hashCode, isStored, resetInternalCaches, resolveAtt, resolveVal, setAttributes, setAttributes, setDdate, setId, setStore, toXml
-
-
-
-
Field Detail
-
PUBLICATION_WFNOTE
public static final java.lang.String PUBLICATION_WFNOTE
- 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
-
CTX_PSTATUS_UPDATE
public static final java.lang.String CTX_PSTATUS_UPDATE
- See Also:
- Constant Field Values
-
ACL_CAN_ATTACH_WS
public static final java.lang.String ACL_CAN_ATTACH_WS
- See Also:
- Constant Field Values
-
ATTACHWS_CHECK_PUB_RIGHTS_PROP
protected static final java.lang.String ATTACHWS_CHECK_PUB_RIGHTS_PROP
- See Also:
- Constant Field Values
-
indexMgr
protected static PublicationIndexManager indexMgr
-
mainLanguage
protected java.lang.String mainLanguage
-
title
protected java.lang.String title
-
titleML
protected java.util.HashMap<java.lang.String,java.lang.String> titleML
-
pdate
protected java.util.Date pdate
-
edate
protected java.util.Date edate
-
sdate
protected java.util.Date sdate
-
adate
protected java.util.Date adate
-
udate
protected java.util.Date udate
-
majorVersion
protected int majorVersion
-
minorVersion
protected transient int minorVersion
-
pstatus
protected int pstatus
-
mergeDate
protected java.util.Date mergeDate
-
mergeId
protected java.lang.String mergeId
-
templates
protected java.lang.String[] templates
-
categories
protected Category[] categories
-
categorySet
protected transient java.util.TreeSet<Category> categorySet
-
authorizedMemberSet
protected java.util.TreeSet<Member> authorizedMemberSet
-
authorizedMemberSetDBID
protected java.util.HashSet<java.lang.String> authorizedMemberSetDBID
-
authorizedGroupSet
protected java.util.TreeSet<Group> authorizedGroupSet
-
updateMemberSet
protected java.util.TreeSet<Member> updateMemberSet
-
updateGroupSet
protected java.util.TreeSet<Group> updateGroupSet
-
restrictUpdateRights
protected boolean restrictUpdateRights
-
classificationLevel
protected int classificationLevel
-
mainInstance
protected Publication mainInstance
-
isTracked
protected boolean isTracked
-
readAck
protected boolean readAck
-
friendlyURLSet
protected java.util.TreeSet<java.lang.String> friendlyURLSet
-
workspace
protected Workspace workspace
-
roleMap
protected java.util.HashMap<java.lang.String,java.util.TreeSet<Member>> roleMap
-
workflowId
protected java.lang.String workflowId
-
attachWorkspaceSet
protected java.util.Set<Workspace> attachWorkspaceSet
-
wfExpressAlarmEntry
protected transient AlarmEntry wfExpressAlarmEntry
-
wfReminderAlarmEntry
protected transient AlarmEntry wfReminderAlarmEntry
-
weakDataImage
protected transient java.lang.String weakDataImage
-
mainInstanceId
protected transient java.lang.String mainInstanceId
-
workspaceId
protected transient java.lang.String workspaceId
-
hasNoReadRightsDBData
protected transient boolean hasNoReadRightsDBData
-
hasNoReadRightsDBDataInitialized
protected transient boolean hasNoReadRightsDBDataInitialized
-
readerCount
protected transient int readerCount
-
voteScore
protected transient int voteScore
-
voteCount
protected transient int voteCount
-
hasAttachWS
protected transient boolean hasAttachWS
-
dbFriendlyURLSet
protected transient java.util.Set<java.lang.String> dbFriendlyURLSet
-
dbFriendlyURLSetInit
protected transient boolean dbFriendlyURLSetInit
-
extendedReadRightsDBData
protected transient boolean extendedReadRightsDBData
-
SYNC_ATTACH_WORKSPACE_MEDIA_ENABLED_PROP
protected static final java.lang.String SYNC_ATTACH_WORKSPACE_MEDIA_ENABLED_PROP
- See Also:
- Constant Field Values
-
-
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:- Default categories
- Default Authorized groups
- Default Pstatus
- Given Workspace
- Given Author and opAuthor
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 publicationws- the workspace of the publication- Since:
- jcms-5.6.0
-
getAllWikiText
public java.lang.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 java.lang.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 java.lang.String[] getSearchStrings()
Searchable implementation- Specified by:
getSearchStringsin interfaceSearchable- 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 java.lang.String toString()
-
importXml
public void importXml(org.jdom.Element elt, ImportOptions options)Description copied from class:DataFill this data with the values contains in the JDOM element.
-
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 java.lang.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 java.lang.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(java.lang.StringBuffer sb, int indentLevel)Description copied from class:DataFills the given StringBuffer with Xml export of fields of this data.- Overrides:
exportXmlFieldin classData- Parameters:
sb- the StringBufferindentLevel- the indent level
-
exportXmlRelated
protected void exportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)- Overrides:
exportXmlRelatedin classData
-
getCurrentWorkerSet
public java.util.Set<Member> getCurrentWorkerSet()
Returns the Set of member which will be current workers on this state of workflow (empty set if no specific worker are available)- Returns:
- the Set of member which will be current workers on this state of workflow (empty set if no specific worker are available)
-
getDocumentLinkSet
public java.util.Set<FileDocument> getDocumentLinkSet()
Returns all the FileDocument instance (and subclass) targeted by this Publication through its link fields and through wiki and wysiwyg field.Included in results:
- both JStore and DBData referenced by this Publication are supported,
- all values referenced in FileDocument fields (or subclass) declared in the Type Editor for this object's type,
- all FileDocument instance (and subclass) referenced in wiki and wysiwyg field of this publication
This method is supported on DBData, it can be invoked on both JStore or DBData objects.
See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
- Returns:
- the set of documents attached to this publication.
- Since:
- jcms-6.0.1
- See Also:
getLinkDataSet(Class)
-
getAllFilePath
public java.util.Set<java.lang.String> getAllFilePath()
Gives the set of all relatives path to all kind (image, media) 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 java.lang.String getTypeLabel(java.lang.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
-
getTypeFieldLabel
public java.lang.String getTypeFieldLabel(java.lang.String fieldName, java.lang.String lang)Returns the localized label of the given field of the given publication.- Parameters:
fieldName- the name of the fieldlang- the language- Returns:
- the localized label of the given field of the given publication.
- Since:
- jcms-9.0.3
- See Also:
Channel.getTypeFieldLabel(Class, String, String)
-
getVersionString
public java.lang.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 java.lang.String toFullString()
- Overrides:
toFullStringin classData- Returns:
- a debug string
-
toCSV
public java.lang.String toCSV(java.lang.String lang)
Returns a CSV view of this object
-
getCSVHeader
public static java.lang.String getCSVHeader(java.lang.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 java.lang.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 java.lang.String getAbstract(java.lang.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 java.lang.String getAbstract(java.lang.String lang)
Returns the abstract of this publication.- Parameters:
lang- the user language- Returns:
- the abstract of this publication.
-
getAbstractML
public java.util.HashMap<java.lang.String,java.lang.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(java.lang.String lang, java.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 valuevalue- the value to set.- Since:
- jcms-7.0.0
-
setAbstract
public void setAbstract(java.lang.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
-
getAbstractAsText
public java.lang.String getAbstractAsText(java.util.Locale locale)
Returns the abstract as raw text (no html or wiki).- Parameters:
locale-Localeused :- to retrieve the abstract field value in the corresponding language
- to use for rendering (wiki or JHTML) before HTML,
Security warning: the returned value is raw text in which special HTML characters are not entity encoded. You MUST encode the returned value using the encoding appropriate to your ouput (HTML, JSON, XML, etc)
- Returns:
- the abstract as raw text (No html or wiki)
- Since:
- jcms 10.0.1 / JCMS-6464
-
clearTransientIndex
public void clearTransientIndex()
Clear all the transient fields that contains indexes. This method is typically called after cloning a publication.
-
setWorkflow
public void setWorkflow(Workflow workflow)
-
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
-
discardCopy
public void discardCopy(Publication copy)
This method is called when the creation of copy or a work copy of this publication has failed. It is intended to perform cleaning operations.- Parameters:
copy- the copy which has been discarded.- Since:
- jcms-8.0.0
-
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
- See Also:
createCopy(Member, Map)
-
createCopy
public Publication createCopy(Member mbr, java.util.Map context)
Creates a copy from this publication- Parameters:
mbr- the author of the copycontext- the context- Returns:
- a (stored) copy of this publication.
- Since:
- jcms-10.0.6
-
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
- See Also:
createWorkCopy(Member, Map)
-
createWorkCopy
public Publication createWorkCopy(Member mbr, java.util.Map context)
Creates a work copy for this publication- Parameters:
mbr- the author of the work copycontext- the context- Returns:
- a (stored) work copy of this publication. Returns null if the member cannot create a work copy.
- Since:
- jcms-10.0.6
-
getDescendantCategorySet
public java.util.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 java.util.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 parameterincludingParentis true. The set is ordered according the Category.OrderComparator. This methods only returns public categories (ie without read rights).- Parameters:
parent- the parent categoryincludingParent- true if the parent has to be included in the set of tested categories- Returns:
- a set of category.
-
getDescendantCategorySet
public java.util.TreeSet<Category> getDescendantCategorySet(Category parent, boolean includingParent, Member member)
Return the set of category of this publication which are descendant of given parent category, including the given parent category in case the parameterincludingParentis true.Check category read rights for the given member.
The set is ordered according the
Category.OrderComparatorusing current userLang (seeChannel.getCurrentUserLang().- Parameters:
parent- the parent categoryincludingParent- true if the parent has to be included in the set of tested categoriesmember- if not null, checks 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 parameterincludingParentis true and the current publication hasparentas category. This methods returns a public category (ie without read rights).- Parameters:
parent- the parent categoryincludingParent- 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 parameterincludingParentis true and the current publication hasparentas category. Check category read rights for the given member.- Parameters:
parent- the parent categoryincludingParent- true if the category membership test must be made on parent toomember- 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 java.util.Set<Publication> getWeakReferrerSet()
Returns the set of weak referrers.Included in results:
- JStore Publication instance that references this Publication through a weak a wiki or wysiwyg field.
Excluded from results (non exhaustive list):
- DBData.
This method is NOT supported on DBData, it will only return results when invoked on JStore objects.
DO NOT alter the returned set, clone prior modification.
See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
- Returns:
- the set of weak referrers.
- Since:
- jcms-5.5.0
- See Also:
getDocumentLinkSet(),getLinkDataSet(Class)
-
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 java.util.Set<java.lang.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 checksearchInGroups- 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
-
canBeReadBy
public final boolean canBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
Checks if the specified member is authorized to read this Publication.This method is the implementation of Data read right control for Publication.
- Overrides:
canBeReadByin classData- Parameters:
member- the member to check (may be null for anonymous user)searchInGroups- set to true to check for read right authorization using Member's group(s).rightInfo- aRightInfoinstance in which explanation of read right authorization acceptance or refusal will be indicated. Value is required and cannot be null.- Returns:
- true if the member can read this Publication, false otherwise
- Since:
- jcms-10.0.0
-
internalCanBeReadBy
protected final boolean internalCanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
-
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(java.lang.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
@Deprecated public final boolean canBeReadBy(Group group)
Deprecated.since JCMS-8577Checks 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
-
canBeReadBy
@Deprecated public final boolean canBeReadBy(Group group, RightInfo rightInfo)
Deprecated.since JCMS-8577Checks if a group can read this publication.- Parameters:
group- the group to checkrightInfo- The RightInfo- Returns:
- true if the group can read this publication
-
isAudienced
public boolean isAudienced()
Check if this publication is Audienced.
This methods directly callsRightPolicy.isAudienced(Publication).- Returns:
- true if this publication is Audienced.
- Since:
- jcms-5.5.0
- See Also:
RightPolicy.isAudienced(Publication)
-
getAudiencedRightsString
public java.lang.String getAudiencedRightsString(java.lang.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 languagemax- 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(java.lang.Boolean b)
Do not call this method. It is reserved for DBData mapping.- Parameters:
b- the value- Since:
- jcms-9.0.2
-
getExtendedReadRights
public boolean getExtendedReadRights()
Checks if this DB publication has been marked as having its read right potentially extended custom right policy.- Returns:
- true if publication read rights are potentially extended, false otherwise (false is the default value)
- Since:
- 10.0.8 / JCMS-10038
- See Also:
setExtendedReadRights(Boolean)
-
setExtendedReadRights
public void setExtendedReadRights(java.lang.Boolean extendedRights)
Indicate that this DB publication has its read rights potentially extended by a custom right policy.Set to true, in a custom
DataController, when your customRightPolicyFilterwants to grant read right beyond the explicit read rights specified throughgetAuthorizedGroupSet()andgetAuthorizedMemberSet().
For performance reason, you should set to true only whengetAuthorizedGroupSet()orgetAuthorizedMemberSet()have been set.- Parameters:
extendedRights- true to extend, false or null otherwise (false is the default value)- Since:
- 10.0.8 / JCMS-10038
-
getReadRightsString
public java.lang.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, ...")The returned string is properly encoded for use in HTML attribute.
- 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.On a public site, a publication is considered public if it can be read by an anonymous user.
On a private site, a publication is considered public if it the only reason it would be refused to an anonymous user is because the site is private.- Returns:
- true is this publication is public, false otherwise
- 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
- See Also:
isWorkCopy()
-
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
-
getMainInstanceId
public java.lang.String getMainInstanceId()
-
setMainInstanceId
public void setMainInstanceId(java.lang.String v)
-
isWorkCopy
public boolean isWorkCopy()
Checks if this publication is a working copy.A publication is a working copy when a non-null publication is referenced in the
mainInstancefield, indicating the original publication that was used to create the working copy.- Returns:
- true if this publication is a working copy (it has a main instance), false if it not a working copy (it does not has a main instance)
- Since:
- jcms-4.0
- See Also:
getMainInstance()
-
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:
WFState.isVisible()
-
canBeArchived
public ControllerStatus canBeArchived(Member mbr, java.util.Map context)
Returns a ControllerStatus indicating if this publication can be archived or not- Parameters:
mbr- the member to checkcontext- the context- 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- the member- 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 checkedisWorkCopy- true if this is a workCopy- Returns:
- true if a given member can create a copy of this publication
- Since:
- jcms-5.6.0
-
canCreateCopy
public boolean canCreateCopy(Member mbr, Workspace targetWorkspace)
Returns true if the given member can create a copy of this publication- Parameters:
mbr- the member to be checkedtargetWorkspace- the workspace where the copy will be created- Returns:
- true if a given member can create a copy of this publication
- Since:
- jcms-10.0.8
-
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
-
canRequestUnlock
public boolean canRequestUnlock(Member mbr)
Description copied from class:DataReturns true if the given member can request to unlock this data.- Overrides:
canRequestUnlockin classData- Parameters:
mbr- the member who request the lock- Returns:
- true if the given member can request to unlock this data.
-
getInternalWorkflow
public Workflow getInternalWorkflow()
Returns the Workflow bound internaly to this publication- Returns:
- the Workflow bound internaly to this publication, if none null is return
- Since:
- jcms-7.1.0
-
getWorkflowId
public java.lang.String getWorkflowId()
Returns the internal workflow id if set (only worklow instance, not workflow associated with the publication class)- Returns:
- the internal workflow id if set (only worklow instance, not workflow associated with the publication class)
-
setWorkflowId
public void setWorkflowId(java.lang.String wfId)
Set the internal workflow id (if the id is null, workflow will be workflow associated with publication class)- Parameters:
wfId- the workflow id
-
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 java.lang.String getWFStateLabel(java.lang.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 java.lang.String getWFStateLabelHtml(java.lang.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- the language- 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 java.util.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 pstatusalarmEntry- 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 <T extends Data> java.util.TreeSet<T> getLinkDataSet(java.lang.Class<T> clazz)
Returns all the data, instance of the specified class, targeted by this Publication through its link fields.Included in results:
- both JStore and DBData referenced by this Publication are supported,
- all values referenced in Data fields (or subclass) declared in the Type Editor for this object's type
e.g.:relatedContentfield ofArticle,faqfield ofFaqEntry,attachements,fromMember,toMember, ... fields of aDBMailMessage,childrenfield of aPortletJspCollection,memberSet,groupSetandlinkedPublicationfields of aJCalendarSchedule,- ...
Excluded from results (non exhaustive list):
- Author, use
Data.getAuthor(), - Members and Groups authorized to read publication, use
getAuthorizedMemberSet()andgetAuthorizedGroupSet(), - Members and Groups authorized to update publication, use
getUpdateMemberSet()andgetUpdateGroupSet(), - Categories of the publication, use
getCategories()orgetCategorySet(), - Workspace of the publication, use
getWorkspace()andgetAttachWorkspaceSet(), - Members mentionned in the wysiwyg fields, use
MentionManager.getMentionedMemberSet(Publication), - Recommendations of this publication, use
RecommendationManager.getRecommendationList(Data), - Publications referenced in wiki and wysiwyg fields of this publication, use
WeakLinkManager.extractWeakLinkSet(Publication), - Comments on the publication, see DBComment plugin API
- ...
This method is supported on DBData, it can be invoked on both JStore or DBData objects.
See online documentation on data links and referrers : https://community.jalios.com/doc/referrer
Implementation note: The default implementation of this method is to return an empty
TreeSet. It is overridden by each subclass.- Parameters:
clazz- the class of Data- Returns:
- a TreeSet of instance of clazz, never returns null.
- Since:
- jcms-4.0
- See Also:
getDocumentLinkSet(),getWeakReferrerSet()
-
checkLang
public boolean checkLang(java.lang.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 java.util.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)orremoveCategory(Category).
This methods always returns a set with the exact same categories available throughgetCategories().- Returns:
- a TreeSet of categories (never return null). DO NOT modify this set.
- Since:
- jcms-5.0.0
-
setCategorySet
public void setCategorySet(java.util.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, java.lang.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 pstatusnote- 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 java.lang.String getDisplayTemplateFile()
Deprecated.Must call instead getTemplatePath()- Returns:
- see getTemplatePath()
-
getQueryTemplateFile
@Deprecated public java.lang.String getQueryTemplateFile()
Deprecated.Must call instead getTemplatePath()- Returns:
- see getTemplatePath()
-
getDefaultTemplateUsage
public java.lang.String getDefaultTemplateUsage()
Returns the default template usage used to display the publication. This default template may change between Content and Portlets- Returns:
- String the default usage
-
isDefaultTemplate
public boolean isDefaultTemplate(java.lang.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 java.lang.String getTemplate(java.lang.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 java.lang.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 java.lang.String getTemplatePath(java.lang.String usage, boolean devModeChecks)Returns the template path for the given usage- Parameters:
usage- the template usagedevModeChecks- perform developpement checks on template- Returns:
- String the path of the template used
-
getTemplateEntry
public TypeTemplateEntry getTemplateEntry(java.lang.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 usagedevModeChecks- perform developpement checks on template- Returns:
- TypeTemplateEntry the matching templates
-
getTemplateEntry
public static TypeTemplateEntry getTemplateEntry(java.lang.String usage, boolean devModeChecks, java.lang.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 usagedevModeChecks- perform developpement checks on templateclazz- the template publication classws- the workspace where to create the publication- Returns:
- TypeTemplateEntry the matching templates
-
resolveTypeTemplateEntry
protected static TypeTemplateEntry resolveTypeTemplateEntry(WSTypeEntry wste, java.lang.String usage, java.lang.String[] templates)
ReturnsTypeTemplateEntrymatching given parameters.Internal mechanism:
- may default usage on a more generic usage
- will use default template if the template list is null
- Parameters:
wste- the Type Descriptionusage- the template usagetemplates- null or available templates- Returns:
- TypeTemplateEntry
- See Also:
TypeEntry.getFirstTemplateEntry(String, String[])
-
checkTemplateEntry
protected static boolean checkTemplateEntry(TypeTemplateEntry tte, java.lang.String usage, boolean devModeChecks, java.lang.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 checkusage- the usagedevModeChecks- perform developpement checks on templatelabel- String use for error message- Returns:
- true if the TypeTemplateEntry match requirement
-
getTemplateEntrySet
public java.util.Set<TypeTemplateEntry> getTemplateEntrySet()
Returns a Set of TypeTemplateEntry matching current publication templates- Returns:
- Set of TypeTemplateEntry
-
getTemplates
public java.lang.String[] getTemplates()
Get the value of templates.- Returns:
- Value of templates.
-
setTemplates
public void setTemplates(java.lang.String[] v)
Set the value of templates.- Parameters:
v- Value to assign to templates.
-
setTemplate
public void setTemplate(java.lang.String name)
-
updateTemplate
protected java.lang.String[] updateTemplate(java.lang.String name, java.lang.String[] templates)
-
getFieldInMainLanguage
public <T> T getFieldInMainLanguage(T field, java.util.HashMap<java.lang.String,T> fieldML)Retrieve the value of the specified multilingual field in the main language of the publication.This method MUST only be used for multilingual fields.
- Parameters:
field- the field value in the site default language.fieldML- the multilingual map of the fields values in other languages.- Returns:
- a field value or null if it could not be found in the publication's main language
- See Also:
setMainLanguage(String)
-
getMainLanguage
public java.lang.String getMainLanguage()
Get the value of main language.- Returns:
- Value of main language.
-
setMainLanguage
public void setMainLanguage(java.lang.String v)
Set the value of main language.- Parameters:
v- Value to assign to main language.
-
getDataImage
public java.lang.String getDataImage()
Returns a data image of this publication based on the image contains in its wiki or wysiwyg fields.- Overrides:
getDataImagein classData- Returns:
- a data image of this publication based on the image contains in its wiki or wysiwyg fields.
- Since:
- JCMS-9.0.0
- See Also:
Data.getDataImage()
-
invalidateWeakDataImage
public void invalidateWeakDataImage()
-
getDataIcon
public java.lang.String getDataIcon()
Description copied from class:DataReturns source information for the icon associated to this Data, either a relative path or sprite classes name.If this method behavior has not been overriden by subclass, the default icon can be declared using property
types.{Type}.icon, where{Type}is the short class name of the type concerned.- Either by specifying a relative image path :
types.Article.icon: images/jalios/icon/abstract.gif
- or else by using a sprite icon :
types.Article.icon: ss_sprite ss_date
- Overrides:
getDataIconin classData- Returns:
- a relative path (eg
images/jalios/icon/abstract.gif) or sprite classes name (egss_sprite ss_date). - See Also:
Data.getDataIconHtml(String)
- Either by specifying a relative image path :
-
getDataIconTitle
public java.lang.String getDataIconTitle(java.lang.String lang)
Description copied from class:DataReturns the icon's tooltip.If this method behavior has not been overriden by subclass, the default alternative text can be declared using language property
types.{Type}.title, where{Type}is the short class name of the type concerned.- Overrides:
getDataIconTitlein classData- Parameters:
lang- the user language.- Returns:
- the title Html attribute for the IMG Html tag
- See Also:
Data.getDataIconHtml(String)
-
getGenericThumbnail
public java.lang.String getGenericThumbnail()
Description copied from class:DataReturns a generic thumbnail for this Data. As defined by propertiestypes.{short-class-name}.thumb.If no property was defined for the class of this Data, the thumbnail specified in property
types.unknown.thumbis used.FileDocument uses its own implementation, see
FileDocument.getGenericThumbnail().- Overrides:
getGenericThumbnailin classData- Returns:
- a thumbnail path relative to the webapp root, eg
images/jalios/icons/data/article.gif
-
getDataName
public java.lang.String getDataName(java.lang.String language)
Description copied from class:DataReturn the name of this Data, every sub class Data which will be displayed to user should implements this method already.
- The Title (multi-language) for a Publication.
- The Name (multi-language) for a Category.
- The Name for a Group, a Member.
- The Title (multi-language) for a Workspace.
Default behaviour is to return toFullString() of Data or empty string if toFullString is null.- Overrides:
getDataNamein classData- 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 java.lang.String getTitle(java.lang.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 java.lang.String getTitle(java.lang.String lang, boolean useDefault)Get the value of title bound to the given language.- Parameters:
lang- the language to get the titleuseDefault- 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 java.lang.String getTitle()
Retrieve the title of this publication in the main site language.- Returns:
- Value of title.
-
setTitle
public void setTitle(java.lang.String v)
Set the title of this publication in the main site language.- Parameters:
v- value to assign to title.
-
getTitleML
public java.util.HashMap<java.lang.String,java.lang.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(java.util.HashMap<java.lang.String,java.lang.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(java.lang.String lang, java.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)orsetTitleML(HashMap)) depending on the specified language.- Parameters:
lang- the language (ISO 639 code) in which to set the valuevalue- the value to set.- Since:
- jcms-5.7
-
getTitleMLE
public java.lang.String getTitleMLE()
Returns the encoded titleML.- Returns:
- the encoded titleML.
- Since:
- jcms-10.0.0
-
setTitleMLE
public void setTitleMLE(java.lang.String v)
Set the value for the encoded titleML- Parameters:
v- the encoded titleML- Since:
- jcms-10.0.0
-
getPdate
public java.util.Date getPdate()
Retrieve the publication date of this publication.- Returns:
- the publication Date or null if not available.
-
setPdate
public void setPdate(java.util.Date v)
Set the publication date of this publication.- Parameters:
v- the Date to assign, can be null.
-
getEdate
public java.util.Date getEdate()
Retrieve the expiration date of this publication.- Returns:
- the expiration Date or null if not available.
-
setEdate
public void setEdate(java.util.Date v)
Set the expiration date of this publication.- Parameters:
v- the Date to assign, can be null.
-
getSdate
public java.util.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(java.util.Date v)
Set the sort date of this publication.- Parameters:
v- the Date to assign, can be null.- Since:
- jcms-4.0
-
getAdate
public java.util.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(java.util.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(java.util.Date udate)
Set the date of last major update.- Parameters:
udate- the date- Since:
- jcms-5.7.0
-
getUdate
public java.util.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.
-
isVersioned
public boolean isVersioned()
Returns true if the current Publication is versioned (is stored or is instance of HistorizedDBData)- Returns:
- true if the current Publication is versioned (is stored or is instance of HistorizedDBData)
- Since:
- jcms-7.0.3
-
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(java.util.Date cdate)
Set the cdate and update the udate- Specified by:
setCdatein interfaceStorable- Overrides:
setCdatein classBasicStorable- Parameters:
cdate- Value to assign to cdate.- Since:
- jcms-5.7.0
- See Also:
BasicStorable.setCdate(java.util.Date)
-
setMergeDate
public void setMergeDate(java.util.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 java.util.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(java.lang.String mergeId)
Set the id of the work copy used for the last merge.- Parameters:
mergeId- the id of the work copy used for the last merge.- Since:
- jcms-5.7.0
-
getMergeId
public java.lang.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 java.util.Set<java.lang.String> getCatIdSet()
Do not call this method. It is reserved for DBData mapping.- Returns:
- the category id set
- Since:
- jcms-6.2.0
-
setCatIdSet
public void setCatIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method. It is reserved for DBData mapping.- Parameters:
idSet- the category id set- Since:
- jcms-6.2.0
-
getAllCatIdSet
public java.util.Set<java.lang.String> getAllCatIdSet()
Do not call this method. It is reserved for DBData mapping.- Returns:
- the "all category" id set
- Since:
- jcms-6.2.0
-
setAllCatIdSet
public void setAllCatIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method. It is reserved for DBData mapping.- Parameters:
idSet- the "all category" id set- Since:
- jcms-6.2.0
-
getVoteScore
public int getVoteScore()
-
setVoteScore
public void setVoteScore(java.lang.Integer voteScore)
-
getVoteCount
public int getVoteCount()
-
setVoteCount
public void setVoteCount(java.lang.Integer voteCount)
-
getPopularity
public int getPopularity()
- Returns:
- the popularity of current Publication
- Since:
- jcms-8.0.0
-
getVoteValue
public int getVoteValue()
- Returns:
- the vote value based on property defined in jcms.prop ("vote.default-value") or the default value
- Since:
- jcms-8.0.0
-
recomputeScore
public void recomputeScore()
Recompute the score of the publication- Since:
- jcms-8.0.0
-
canBeVotedBy
public boolean canBeVotedBy(Member mbr)
- Parameters:
mbr- the Member- Returns:
- true if given Member can vote on current Publication
- Since:
- jcms-8.0.0
-
isVotable
public boolean isVotable()
- Returns:
- true if this Publication is votable
-
getWorkCopySet
public java.util.Set<Publication> getWorkCopySet()
Get the value of workCopySet.- Returns:
- Value of workCopySet.
- Since:
- jcms-5.5.0
-
getAuthorizedMemberSet
public java.util.Set<Member> getAuthorizedMemberSet()
Get the set of Member and DBMember authorized to read this Publication.- Returns:
- a set of Member.
- Since:
- jcms-2.1
-
getAuthorizedMemberSet
public java.util.Set<Member> getAuthorizedMemberSet(boolean queryDB)
Get the set of Member authorized to read this Publication.DBMembers are also queried if queryDB parameter is true.
- Parameters:
queryDB- weither to also query DBMember or not- Returns:
- a set of Member.
- Since:
- jcms-10.0.1
-
setAuthorizedMemberSet
public void setAuthorizedMemberSet(java.util.TreeSet<Member> memberSet)
Set the set of Member authorized to read this Publication.- Parameters:
memberSet- a set of Member.- Since:
- jcms-2.1
-
splitHybridCollections
protected void splitHybridCollections(Data previousData)
Description copied from class:DataThis method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Overrides:
splitHybridCollectionsin classData- Parameters:
previousData- the previous data (provided for update only)
-
cleanHybridCollections
protected void cleanHybridCollections()
Description copied from class:DataThis method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Overrides:
cleanHybridCollectionsin classData
-
getAuthorizedMemberSetDBID
public java.util.HashSet<java.lang.String> getAuthorizedMemberSetDBID()
-
setAuthorizedMemberSetDBID
public void setAuthorizedMemberSetDBID(java.util.HashSet<java.lang.String> v)
-
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 java.util.Set<java.lang.String> getAuthMbrIdSet()
Do not call this method. It is reserved for DBData mapping.- Returns:
- he authMbrIdSet
- Since:
- jcms-6.2.0
-
setAuthMbrIdSet
public void setAuthMbrIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method. It is reserved for DBData mapping.- Parameters:
idSet- the set of authorized Member's id- Since:
- jcms-6.2.0
-
getAuthorizedGroupSet
public java.util.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(java.util.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 java.util.Set<java.lang.String> getAuthGrpIdSet()
Do not call this method. It is reserved for DBData mapping.- Returns:
- the authGrpIdSet
- Since:
- jcms-6.2.0
-
setAuthGrpIdSet
public void setAuthGrpIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method. It is reserved for DBData mapping.- Parameters:
idSet- the set of authorized Group's id- Since:
- jcms-6.2.0
-
getRestrictUpdateRights
public boolean getRestrictUpdateRights()
Returns true if the update rights of this publication are restricted.- Returns:
- true if the update rights of this publication are restricted.
- Since:
- jcms-10.0.5
-
setRestrictUpdateRights
public void setRestrictUpdateRights(java.lang.Boolean v)
If true, restrict the update rights to the members declared in updateMemberSet and updateGroupSet.- Parameters:
v- the value- Since:
- jcms-10.0.5
-
getUpdateMemberSet
public java.util.Set<Member> getUpdateMemberSet()
Get the set of Member authorized to update this Publication.- Returns:
- a set of Member.
- Since:
- jcms-2.1
-
setUpdateMemberSet
public void setUpdateMemberSet(java.util.TreeSet<Member> memberSet)
Set the Members explicitely authorized to update this instance.- Parameters:
memberSet- a set of Member.- Since:
- jcms-2.1
-
getUpdateMbrIdSet
public java.util.Set<java.lang.String> getUpdateMbrIdSet()
Do not call this method. It is reserved for DBData mapping.- Returns:
- he authMbrIdSet
- Since:
- jcms-9.0.2
-
setUpdateMbrIdSet
public void setUpdateMbrIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method. It is reserved for DBData mapping.- Parameters:
idSet- the set of authorized Member's id- Since:
- jcms-9.0.2
-
getUpdateGroupSet
public java.util.Set<Group> getUpdateGroupSet()
Get the set of Group authorized to update this Publication.- Returns:
- a set of Group.
- Since:
- jcms-2.1
-
setUpdateGroupSet
public void setUpdateGroupSet(java.util.TreeSet<Group> groupSet)
Set the Groups whose members are explicitely authorized to update this instance.- Parameters:
groupSet- a set of Group.- Since:
- jcms-2.1
-
getUpdateGrpIdSet
public java.util.Set<java.lang.String> getUpdateGrpIdSet()
Do not call this method. It is reserved for DBData mapping.- Returns:
- the updateGrpIdSet
- Since:
- jcms-9.0.2
-
setUpdateGrpIdSet
public void setUpdateGrpIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method. It is reserved for DBData mapping.- Parameters:
idSet- the set of authorized Group's id- Since:
- jcms-9.0.2
-
getEffectiveClassificationLevel
public int getEffectiveClassificationLevel()
Retrieve the effective classification level of this publication using baseline classification level configured on site.If this workspace classification was not specified (
getClassificationLevel()is zero), the effective level used for read right, feature access and constraint required is the baseline levelClassificationManager.getBaselineLevel().- Returns:
- a value from 1 (if baseline is 1) to
ClassificationManager.getMaximumLevel()(if baseline is the maximum level) - Since:
- 10.0.8 / JCMS-10746
- See Also:
ClassificationManager
-
getClassificationLevel
public int getClassificationLevel()
Retrieve the classification level of this publication.When creating new publication, if classification level was not explicitely specified, the classification level of the publication's workspace is automatically used.
- Returns:
- a value from 0 for unclassified publication to
ClassificationManager.getMaximumLevel()(included) for highly classified publication - Since:
- 10.0.8 / JCMS-10746
- See Also:
ClassificationManager
-
setClassificationLevel
public void setClassificationLevel(java.lang.Integer level)
Set the classification level of this publication.- Parameters:
level- a value from 0 for unclassified publication toClassificationManager.getMaximumLevel()(included) for highly classified publication. 0 if used if null is specified.- Since:
- 10.0.8 / JCMS-10746
- See Also:
ClassificationManager
-
isClassified
public boolean isClassified()
Check if this publication is classified.- Returns:
- true if this publication has a its effective classification level higher than 1 (and classification is enabled), false otherwise
- Since:
- 10.0.8 / JCMS-10746
- See Also:
getEffectiveClassificationLevel()
-
supportsClassification
public final boolean supportsClassification()
Check if this publication supports being classified.- Returns:
- false if this publication is a PortalElement, true for all other publication
- Since:
- 10.0.8 / JCMS-10746
-
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
-
getReadAck
public boolean getReadAck()
Returns true if read acknowledge is mandatory on this publication.- Returns:
- true if read acknowledge is mandatory on this publication.
- Since:
- jcms-10.0.5
-
setReadAck
public void setReadAck(java.lang.Boolean v)
If true, read acknowledge is mandatory on this publication.- Parameters:
v- the value- Since:
- jcms-10.0.5
-
canBeFollowedBy
public boolean canBeFollowedBy(Member mbr)
Returns true if the given member can follow this publication- Parameters:
mbr- the member- Returns:
- true if the given member can follow this publication
- 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 java.util.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, java.util.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.
-
getAttachWorkspaceSet
public java.util.Set<Workspace> getAttachWorkspaceSet()
Returns the attachWorkspaceSet- Returns:
- the attachWorkspaceSet
- Since:
- jcms-10.0.0
-
setAttachWorkspaceSet
public void setAttachWorkspaceSet(java.util.Set<Workspace> attachWorkspaceSet)
Set the attachWorkspaceSet- Parameters:
attachWorkspaceSet- the attachWorkspaceSet- Since:
- jcms-10.0.0
-
getAttachWSIdSet
public java.util.Set<java.lang.String> getAttachWSIdSet()
Do not call this method. It is reserved for DBData mapping.- Returns:
- the attachWSIdSet
- Since:
- jcms-10.0.0
-
setAttachWSIdSet
public void setAttachWSIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method. It is reserved for DBData mapping.- Parameters:
idSet- the Set of Workspace id to use for attachWSIdSet- Since:
- jcms-10.0.0
-
getHasAttachWS
public boolean getHasAttachWS()
Returns true if this publication is attached to other workspaces.- Returns:
- true if this publication is attached to other workspaces.
- Since:
- jcms-10.0.0
-
setHasAttachWS
public void setHasAttachWS(java.lang.Boolean v)
Do not call this method. It is reserved for DBData mapping.- Parameters:
v- the hasAttachWS- Since:
- jcms-10.0.0
-
getRoleMap
public java.util.HashMap<java.lang.String,java.util.TreeSet<Member>> getRoleMap()
- Returns:
- Returns the roleMap.
- Since:
- jcms-5.5.0
-
setRoleMap
public void setRoleMap(java.util.HashMap<java.lang.String,java.lang.Object> roleMap)
- Parameters:
roleMap- The roleMap to set- Since:
- jcms-5.5.0
-
setRoleMemberSetMap
public void setRoleMemberSetMap(java.util.HashMap<java.lang.String,java.util.TreeSet<Member>> roleMap)
-
setRoleMapStr
public void setRoleMapStr(java.lang.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 java.lang.String getRoleMapStr()
Returns the encoded String from the current roleMap (only used for DBData property mapping)- Returns:
- the encoded String from the current roleMap.
- Since:
- jcms-7.0.1
-
assignRole
public void assignRole(java.lang.String roleId, Member mbr)Assigns a member to a role- Parameters:
roleId- the identifier of the WF role (e.g. "basic-validators")mbr- the member to be assigned to the role- Since:
- jcms-5.5.0
-
assignRole
public void assignRole(java.lang.String roleId, java.util.TreeSet<Member> mbrSet)
-
unassignRole
public void unassignRole(java.lang.String roleId)
Unassigns a member to a role- Parameters:
roleId- the identifier of the WF role (e.g. "basic-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(java.lang.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 java.util.TreeSet<Member> getMemberSetAssignedToRole(java.lang.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(java.lang.String roleId, Member mbr)Determines whether the given member can use the given role for this publication- Parameters:
roleId- the WFRole IDmbr- the member to be checked- Returns:
- true if the member can use the given role
- Since:
- jcms-5.5.0
-
getFriendlyURLSet
public java.util.TreeSet<java.lang.String> getFriendlyURLSet()
Get friendly urls Set.- Returns:
- a TreeSet of friendly url (String).
-
setFriendlyURLSet
public void setFriendlyURLSet(java.util.TreeSet<java.lang.String> v)
-
getDbFriendlyURLSet
public java.util.Set<java.lang.String> getDbFriendlyURLSet()
-
setDbFriendlyURLSet
public void setDbFriendlyURLSet(java.util.Set<java.lang.String> v)
-
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
-
getReaderTracker
public ReaderTracker getReaderTracker(Member mbr)
Returns the ReaderTracker for this publication and the given member.- Parameters:
mbr- the member- Returns:
- the ReaderTracker for this publication and the given member.
- Since:
- jcms-10.0.5
-
getReaderTrackerList
public java.util.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
-
hasBeenReadAckBy
public boolean hasBeenReadAckBy(Member mbr)
Returns true if the given member has confirmed the reading of this publication.- Parameters:
mbr- the member- Returns:
- if the given member has confirmed the reading of the given publication.
- Since:
- jcms-10.0.5
-
getReadAckCount
public int getReadAckCount()
Returns the count of member who confirm the reading of this publication.- Returns:
- the count of member who confirm the reading of this publication.
- Since:
- jcms-10.0.5
-
ackRead
public void ackRead(Member mbr)
Confirm the read of this publication by the given member.- Parameters:
mbr- the member- Since:
- jcms-10.0.5
-
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
-
trackReader
public void trackReader(Member mbr, int accessType)
Track the given reader for given access type.- Parameters:
mbr- the user to be tracked (may be null).accessType- the type of access- Since:
- jcms-8.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, java.util.Set<? extends Data> dataSet)
Remove all the data of the given data set- Parameters:
opAuthor- the member who performs this operationdataSet- the data set to be removed- Since:
- jcms-5.5.0
-
removeAllDescendants
public void removeAllDescendants(Member opAuthor, java.util.Map context)
Remove all descendant TreeNode that can be deleted- Parameters:
opAuthor- the member who performs this operationcontext- 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 java.lang.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 changenewPstatus- 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 java.lang.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 changenewPstatus- the new pstatusoldPstatus- 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, java.lang.String note)
Create/Update a WFNote and check if the transition can be performed.- Parameters:
mbr- the member which performe this operationnewPstatus- new pstatusnote- 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, java.lang.String note)
Create/Update a WFNote and check if the transition can be performed.- Parameters:
mbr- the member which performe this operationnewPstatus- new pstatusoldPstatus- old pstatusnote- member's comment- Returns:
- true if state transition must be performed
- Since:
- jcms-6.1.3
-
getTitleComparator
public static <T extends Publication> java.util.Comparator<T> getTitleComparator()
- Returns:
- a new instance of
Publication.TitleComparator.
-
getTitleComparator
public static <T extends Publication> java.util.Comparator<T> getTitleComparator(java.lang.String lang)
- Parameters:
lang- the user language- Returns:
- a new instance of
Publication.TitleComparatorusing the given language. - Since:
- jcms-4.0
-
getPdateComparator
public static <T extends Publication> java.util.Comparator<T> getPdateComparator()
- Returns:
- a new instance of
Publication.PdateComparator. - Since:
- jcms-2.1
-
getEdateComparator
public static <T extends Publication> java.util.Comparator<T> getEdateComparator()
- Returns:
- a new instance of
Publication.EdateComparator. - Since:
- jcms-2.1
-
getSdateComparator
public static <T extends Publication> java.util.Comparator<T> getSdateComparator()
- Returns:
- a new instance of
Publication.SdateComparator. - Since:
- jcms-4.0
-
getAdateComparator
public static <T extends Publication> java.util.Comparator<T> getAdateComparator()
- Returns:
- a new instance of
Publication.AdateComparator. - Since:
- jcms-4.1.1
-
getUdateComparator
public static <T extends Publication> java.util.Comparator<T> getUdateComparator()
- Returns:
- a new instance of
Publication.UdateComparator. - Since:
- jcms-5.7.0
-
getDdateComparator
public static <T extends Publication> java.util.Comparator<T> getDdateComparator()
- Returns:
- a new instance of
Publication.DdateComparator. - Since:
- jcms-5.5.0
-
getWorkspaceComparator
public static <T extends Publication> java.util.Comparator<T> getWorkspaceComparator(java.lang.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> java.util.Comparator<T> getPstatusComparator()
- Returns:
- a new instance of
Publication.PstatusComparator. - Since:
- jcms-2.1
-
getRightComparator
public static <T extends Publication> java.util.Comparator<T> getRightComparator()
- Returns:
- a new instance of
Publication.RightComparator. - Since:
- jcms-2.1
-
getAudienceRightComparator
public static <T extends Publication> java.util.Comparator<T> getAudienceRightComparator()
- Returns:
- a new instance of
Publication.AudienceRightComparator. - Since:
- jcms-5.5.0
-
getTypeComparator
public static <T extends Publication> java.util.Comparator<T> getTypeComparator()
- Returns:
- a new instance of
Publication.TypeComparator. - Since:
- jcms-2.1
-
getReaderComparator
public static <T extends Publication> java.util.Comparator<T> getReaderComparator()
- Returns:
- a new instance of
Publication.ReaderComparator. - Since:
- jcms-4.0.2
-
getVoteScoreComparator
public static <T extends Publication> java.util.Comparator<T> getVoteScoreComparator()
- Returns:
- a new instance of
Publication.VoteScoreComparator. - Since:
- jcms-8.0.0
-
getPopularityComparator
public static <T extends Publication> java.util.Comparator<T> getPopularityComparator()
- Returns:
- a new instance of
Publication.PopularityComparator. - Since:
- jcms-8.0.0
-
getComparator
@Deprecated public static java.util.Comparator getComparator(java.lang.String str, boolean reverse)Deprecated.Retrieves a newComparatorgiven a name representing it. The returned comparator can be used to sort anyCollectioncontainingPublications.You can specify any of the following value:
"title":getTitleComparator()"workspace":getWorkspaceComparator(String)"pstatus":getPstatusComparator()"right":getRightComparator()"audienceRight":getAudienceRightComparator()"type":getTypeComparator()"pdate":getPdateComparator()"edate":getEdateComparator()"sdate":getSdateComparator()"adate":getAdateComparator()"udate":getUdateComparator()"ddate":getDdateComparator()"reader":getReaderComparator()
Data.getComparator(String, boolean)- Parameters:
str- a string representing the comparatorreverse- 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
@Deprecated public static <T extends Publication> java.util.Comparator<T> getComparator(java.lang.Class<T> clazz, java.lang.String str, boolean reverse)
Deprecated.- Parameters:
clazz- the clazzstr- the name of the comparatorreverse- true to reverse the comparator order- Returns:
- the comparator
-
getComparator
@Deprecated public static java.util.Comparator getComparator(java.lang.String str, boolean reverse, QueryResultSet queryResultSet)Deprecated.Retrieves a newComparatorgiven a name representing it. The returned comparator can be used to sort anyCollectioncontainingPublications.This method add the following possible value to the behavior of
getComparator(String, boolean)"relevance":QueryResultSet.getScoreComparator(QueryResultSet, Comparator)with the givenqueryResultSet andBasicStorable.getMdateComparator()
- Parameters:
str- the name of the comparatorreverse- if true reverse the compartor orderqueryResultSet- the QueryResultSet- Returns:
- a new instance of the
Comparatorto use when returning aSortedSet. - Since:
- jcms-5.5.0
- See Also:
getComparator(String, boolean),Data.getComparator(String, boolean)
-
getDate
public java.util.Date getDate(java.lang.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.
-
getDate
public java.util.Date getDate(java.lang.String dateType, java.util.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.
-
getIndexingDate
public java.util.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)
- Parameters:
member- the member- Returns:
- a new instance of
Publication.AuthorizedSelectorusing the givenMember. - Since:
- jcms-2.1
-
getCanWorkOnSelector
public static Publication.CanWorkOnSelector getCanWorkOnSelector(Member member)
- Parameters:
member- the member- Returns:
- a new instance of
Publication.CanWorkOnSelectorusing the givenMember. - Since:
- jcms-4.0.2
-
getWorkspaceSelector
public static Publication.WorkspaceSelector getWorkspaceSelector(Workspace workspace)
- Parameters:
workspace- the workspace- Returns:
- a new instance of
Publication.WorkspaceAuthorSelectorusing the givenWorkspace. - Since:
- jcms-4.0.2
-
getWorkspaceAuthorSelector
public static Publication.WorkspaceAuthorSelector getWorkspaceAuthorSelector(Workspace workspace, Member author)
- Parameters:
workspace- the workspaceauthor- the author- Returns:
- a new instance of
Publication.WorkspaceAuthorSelectorusing the givenWorkspaceandMember. - 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)
- Parameters:
pstatus- the 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)
- Parameters:
pstatus- the reference pstatus to be used during comparisongreater- an integer indicating the comparison to be performed :-1: to select publications with a pstatus lower than or equals to the reference pstatus1: to select publications with a pstatus greater than or equals to the reference pstatusany other value: to select publications with a pstatus equals to the reference pstatus
- Returns:
- a new instance of
Publication.PstatusSelector. - Since:
- jcms-2.1
- See Also:
Publication.PstatusSelector
-
getPdateSelector
public static Publication.PdateSelector getPdateSelector(java.util.Date begin, java.util.Date end)
- Parameters:
begin- the begin dateend- the end date- Returns:
- a new instance of
Publication.PdateSelectorusing the given begin and endDate. - Since:
- jcms-2.1
-
getSdateSelector
public static Publication.SdateSelector getSdateSelector(java.util.Date begin, java.util.Date end)
- Parameters:
begin- the begin dateend- the end date- Returns:
- a new instance of
Publication.SdateSelectorusing the given begin and endDate. - Since:
- jcms-4.1
-
getEdateSelector
public static Publication.EdateSelector getEdateSelector(java.util.Date begin, java.util.Date end)
- Parameters:
begin- the begin dateend- the end date- Returns:
- a new instance of
Publication.EdateSelectorusing the given begin and endDate. - Since:
- jcms-2.1
-
getAdateSelector
public static Publication.AdateSelector getAdateSelector(java.util.Date begin, java.util.Date end)
- Parameters:
begin- the begin dateend- the end date- Returns:
- a new instance of
Publication.AdateSelectorusing the given begin and endDate. - Since:
- jcms-4.1.1
-
getUdateSelector
public static Publication.UdateSelector getUdateSelector(java.util.Date begin, java.util.Date end)
- Parameters:
begin- the begin dateend- the end date- Returns:
- a new instance of
Publication.UdateSelectorusing the given begin and endDate. - Since:
- jcms-4.1.1
-
getDateSelector
public static DataSelector getDateSelector(java.lang.String str, java.util.Date begin, java.util.Date end)
Retrieves a newDataSelectorgiven a name representing it. The returned selector can be passed to the methodJcmsUtil.applyDataSelector(java.util.Collection, DataSelector)to allow precise control over the selection ofDatain aCollection.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)
Data.getDateSelector(String, Date, Date)- Parameters:
str- a string representing the selectorbegin- the beginDateto use for selectionend- the endDateto 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 java.util.Collection<? extends TreeNode> getTreeChildren()
Description copied from interface:TreeNodeReturns a Collection of TreeNode children of the current node- Specified by:
getTreeChildrenin interfaceTreeNode- Returns:
- Collection of TreeNode
- See Also:
TreeNode.getTreeChildren()
-
getTreeParent
public TreeNode getTreeParent()
Description copied from interface:TreeNodeReturns parent of the current node- Specified by:
getTreeParentin interfaceTreeNode- Returns:
- TreeNode parent Node
- See Also:
TreeNode.getTreeParent()
-
isTreeLeaf
public boolean isTreeLeaf()
Description copied from interface:TreeNodeReturns boolean true if the TreeNode is a leaf- Specified by:
isTreeLeafin interfaceTreeNode- Returns:
- boolean indicating if node is leaf or node
- See Also:
TreeNode.isTreeLeaf()
-
isTreeNode
public boolean isTreeNode()
Description copied from interface:TreeNodeReturns boolean true if the TreeNode is a node- Specified by:
isTreeNodein interfaceTreeNode- Returns:
- boolean indicating if node is leaf or node
- See Also:
TreeNode.isTreeNode()
-
getTreeRoot
public TreeNode getTreeRoot()
Description copied from interface:TreeNodeReturns the root of the current node- Specified by:
getTreeRootin interfaceTreeNode- Returns:
- TreeNode root Node
-
checkIntegrity
public ControllerStatus checkIntegrity()
Checks whether or not data integrity constraints are respected.- Overrides:
checkIntegrityin classData- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkWrite
public ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)
Checks if the given write operation can be performed- Overrides:
checkWritein classData- Parameters:
op- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcheckIntegrity- if true, requires the constraints integrity to be checkedcontext- 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, java.util.Map context)
Checks if the given member can perform the given operation.- Overrides:
checkMemberin classData- Parameters:
op- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkCreate
public ControllerStatus checkCreate(Member mbr, java.util.Map context)
Checks if the creation can be performed- Overrides:
checkCreatein classData- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkUpdate
public ControllerStatus checkUpdate(Member mbr, java.util.Map context)
Checks if the update can be performed- Overrides:
checkUpdatein classData- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkDelete
public ControllerStatus checkDelete(Member mbr, java.util.Map context)
Checks if the deletion can be performed- Overrides:
checkDeletein classData- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
checkMerge
public ControllerStatus checkMerge(Member mbr, java.util.Map context)
Checks if the merge can be performed- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Returns:
- a ControllerStatus
- Since:
- jcms-5.0.0
-
performCreate
public void performCreate(Member mbr, java.util.Map context)
Performs data creation- Overrides:
performCreatein classData- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
performUpdate
public void performUpdate(Member mbr, java.util.Map context)
Performs data update- Overrides:
performUpdatein classData- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
performDelete
public void performDelete(Member mbr, java.util.Map context)
Performs data deletion- Overrides:
performDeletein classData- Parameters:
mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)- Since:
- jcms-5.0.0
-
prepareMergeCopy
protected void prepareMergeCopy(Publication mergeCopy)
-
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, java.util.Map context)
Performs publication merge- Parameters:
mbr- the member which requests the write operationcontext- 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, java.util.Map context)Description copied from class:DataCalled to perform some action before the write.- Overrides:
performBeforeWritein classData- Parameters:
op- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)
-
performAfterWrite
protected void performAfterWrite(int op, Member mbr, java.util.Map context)Description copied from class:DataCalled to perform some action after the write.- Overrides:
performAfterWritein classData- Parameters:
op- the operation (OP_CREATE, OP_UPDATE, ...)mbr- the member which requests the write operationcontext- a map which contains context parameters (may be null)
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName, java.lang.String lang, boolean useDefault) throws java.lang.NoSuchFieldExceptionGets the value of the givenObjectfield name for the currentData.
If the field is multilingual, the given language will be used.
Do not retrieveCategoryfields, see #getCategoryFieldValue(String, Member).- Overrides:
getFieldValuein classData- 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
Objectfield value - Throws:
java.lang.NoSuchFieldException- if the field was not found in the givenData.
-
setFieldValue
public void setFieldValue(java.lang.String fieldName, java.lang.Object value, java.lang.String lang) throws java.lang.NoSuchFieldExceptionSets the value of the givenObjectfield name for the currentData.
If the field is multilingual, the given language will be used.
Do not retrieveCategoryfields, see #getCategoryFieldValue(String, Member).- Overrides:
setFieldValuein classData- 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:
java.lang.NoSuchFieldException- if the field was not found in the givenData.- 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 :
- author
- workspace
- main language
- major version
- pdate
- adate
- udate
- sdate
- edate
- pstatus
- tracked
- merge date
- merge id
- categories
- display template
- query template
- authorized member set
- authorized group set
- update member set
- update group set
- friendly URLs set
- role map
- Parameters:
pub- the publication to copy from.- Since:
- jcms-5.7.2
-
getImportVersion
public java.lang.String getImportVersion()
Get the value of importVersion.- Returns:
- Value of importVersion.
- Since:
- jcms-5.7.2
-
setImportVersion
public void setImportVersion(java.lang.String v)
Set the value of importVersion.- Parameters:
v- Value to assign to importVersion.- Since:
- jcms-5.7.2
-
getWFNoteList
public java.util.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 java.lang.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(java.lang.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:DataThis methods force the collections of the DBData to be initialized()- Overrides:
initializeDBDataCollectionsin classData
-
cloneDBDataCollections
public void cloneDBDataCollections()
-
attachPublication
public boolean attachPublication(java.lang.String fieldName, Publication attachment)Attaches the given publication to the given field of this publication. The publication is not saved.- Parameters:
fieldName- the name of the fieldattachment- the publication to attach to.- Returns:
- true if this publication has been attached to the given field.
- Since:
- jcms-9.0.0
-
canBeAttachedBy
public boolean canBeAttachedBy(Member mbr)
Returns true if the given member can attach this publication to another workspace.- Parameters:
mbr- the member- Returns:
- true if the given member can attach this publication to another workspace.
- Since:
- jcms-10.0.0
-
canBeAttachedTo
public boolean canBeAttachedTo(Workspace attachWorkspace, Member mbr)
Returns true if the given member can attach this publication to the given workspace.- Parameters:
attachWorkspace- the workspace to attach this publicationmbr- the member- Returns:
- if the given member can attach this publication to the given workspace.
- Since:
- jcms-10.0.0
-
canBeDetachedFrom
public boolean canBeDetachedFrom(Workspace attachWorkspace, Member mbr)
Returns true if the given member can detach this publication from the given workspace.- Parameters:
attachWorkspace- the workspace this publication is attached to.mbr- the member- Returns:
- true if the given member can detach this publication from the given workspace.
- Since:
- jcms-10.0.0
-
attachTo
public ControllerStatus attachTo(Workspace attachWorkspace, java.util.Set<Category> catSet, Member mbr)
Attaches this publication to the given workspace with the given categories.- Parameters:
attachWorkspace- the attach workspacecatSet- the set of categories for this attachmentmbr- the member who performs the attachment.- Returns:
- the ControllerStatus of the publication update.
- Since:
- jcms-10.0.0
-
detachFrom
public ControllerStatus detachFrom(Workspace attachWorkspace, Member mbr)
Detaches this publication for the given attachWorkspace. This operation is performed by the given member.- Parameters:
attachWorkspace- the attach workspacembr- the member who performs the detachment.- Returns:
- the ControllerStatus of the publication update.
- Since:
- jcms-10.0.0
-
isTrashed
public boolean isTrashed()
- Returns:
- true if this publication is in the trash
- Since:
- jcms-10.0.6
-
checkAndPerformTrash
public ControllerStatus checkAndPerformTrash(Member opAuthor, java.util.Map context)
Check if publication can be put in trash, and do it if possible and authorized.Requirement : this MUST be an update instance, as returned by
Data.getUpdateInstance()- Parameters:
opAuthor- the member who performs the trash operation.context- a map which contains context parameters (may be null)- Returns:
- the ControllerStatus of the publication trash operation.
- Since:
- jcms-10.0.5 / JCMS-8353
-
checkTrash
public ControllerStatus checkTrash(Member opAuthor, java.util.Map context)
Check this publication can be trashed given its current state and authorization of specified member.Requirement : this MUST be an update instance, as returned by
Data.getUpdateInstance()- Parameters:
opAuthor- the member who performs the trash operation.context- a map which contains context parameters (may be null)- Returns:
- the ControllerStatus of the publication trash verification.
- Since:
- jcms-10.0.5 / JCMS-8353
-
performTrash
public void performTrash(Member opAuthor, java.util.Map context)
Put this put publication in the trash.Putting publication in trash means changing its pstatus to 30 (while tracking its current pstatus in case it is untrashed later).
Requirement : this MUST be an update instance, as returned by
Data.getUpdateInstance()- Parameters:
opAuthor- the member who performs the trash operation.context- a map which contains context parameters (may be null)- Since:
- jcms-10.0.5 / JCMS-8353
- See Also:
checkAndPerformTrash(Member, Map)
-
checkAndPerformUntrash
public ControllerStatus checkAndPerformUntrash(Member opAuthor, java.util.Map context)
Check if publication can be removed from trash, and do it if possible and authorized.Requirement : this MUST be an update instance, as returned by
Data.getUpdateInstance()- Parameters:
opAuthor- the member who performs the untrash operation.context- a map which contains context parameters (may be null)- Returns:
- the ControllerStatus of the publication untrash operation.
- Since:
- jcms-10.0.5 / JCMS-8353
-
checkUntrash
public ControllerStatus checkUntrash(Member opAuthor, java.util.Map context)
Check this publication can be remove from trashed given its current state and authorization of specified member.Requirement : this MUST be an update instance, as returned by
Data.getUpdateInstance()- Parameters:
opAuthor- the member who performs the untrash operation.context- a map which contains context parameters (may be null)- Returns:
- the ControllerStatus of the publication untrash verification.
- Since:
- jcms-10.0.5 / JCMS-8353
- See Also:
checkAndPerformUntrash(Member, Map)
-
performUntrash
public void performUntrash(Member opAuthor, java.util.Map context)
Remove this publication from the trash.Removing publication from trash means changing its pstatus back to the pstatus it had before being trashed.
Requirement : this MUST be an update instance, as returned by
Data.getUpdateInstance()- Parameters:
opAuthor- the member who performs the untrash operation.context- a map which contains context parameters (may be null)- Since:
- jcms-10.0.5 / JCMS-8353
- See Also:
checkAndPerformUntrash(Member, Map)
-
getReferrerSet
public java.util.Set getReferrerSet(boolean searchInDB)
Returns the referrer set of this data.- Parameters:
searchInDB- if true search for DB publication referring this publication.- Returns:
- the referrer set of this data.
- Since:
- jcms-10.0.2
-
updateDisplayLinkCss
public java.lang.StringBuilder updateDisplayLinkCss(java.lang.StringBuilder builder)
Description copied from class:DataReturns a StringBuilder which contains css, whom you can modify or replace in your subclasses- Overrides:
updateDisplayLinkCssin classData- Parameters:
builder- theStringBuilder- Returns:
- a
StringBuilderwhich contains css of display link
-
updateDisplayLinkDataAttribute
public DataAttribute updateDisplayLinkDataAttribute(DataAttribute dataAttribute)
Description copied from class:DataReturns a DataAttribute which contains data attributes, whom you can modify or replace in your subclasses- Overrides:
updateDisplayLinkDataAttributein classData- Parameters:
dataAttribute- theDataAttribute- Returns:
- a
DataAttributewhich contains data attributes of display link
-
-