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 class
Publication.AdateComparator<T extends Publication>
Compares two Publications using their Adate in descending order (newest date first).static class
Publication.AdateSelector
AdateSelector selects all the publications with a adate in a given rangestatic class
Publication.AudienceRightComparator<T extends Publication>
Comparator to compare Publication using their audience rights.static class
Publication.AudienceRightSelector
AudienceRightSelector selects all publications being audienced.static class
Publication.AuthorComparator<T extends Publication>
static class
Publication.AuthorizedSelector
AuthorizedSelector selects all the publications a member is authorized to read.static class
Publication.CanWorkOnSelector
CanWorkOnSelector selects all the publications a member can work on.static class
Publication.DdateComparator<T extends Publication>
Compares two Publications using their Ddate in descending order (newest date first).static class
Publication.EdateComparator<T extends Publication>
Compares two Publications using their Edate in descending order (newest date first).static class
Publication.EdateSelector
EdateSelector selects all the publications with a edate in a given rangestatic class
Publication.PdateComparator<T extends Publication>
Compares two Publications using their Pdate in descending order (newest date first).static class
Publication.PdateSelector
PdateSelector selects all the publications with a pdate in a given rangestatic class
Publication.PopularityComparator<T extends Publication>
Comparator to compare Publication using their score based on votesstatic class
Publication.PstatusComparator<T extends Publication>
static class
Publication.PstatusSelector
PstatusSelector selects all the publications with a given pstatus.static class
Publication.ReaderComparator<T extends Publication>
static class
Publication.ReadRightSelector
ReadRightSelector selects all publications which have any read right.static class
Publication.RelatedCategoryComparator<T extends Publication>
Publication are sorted according the count of common categories with the given category set.static class
Publication.RightComparator<T extends Publication>
static class
Publication.SdateComparator<T extends Publication>
Compares two Publications using their Sdate in descending order (newest date first).static class
Publication.SdateSelector
SdateSelector select all the publications with a sdate in a given rangestatic class
Publication.TitleComparator<T extends Publication>
static class
Publication.TrackedSelector
TrackedSelector selects all the publications which are tracked.static class
Publication.TypeComparator<T extends Publication>
static class
Publication.UdateComparator<T extends Publication>
Compares two Publications using their udate in descending order (newest date first).static class
Publication.UdateSelector
UdateSelector selects all the publications with a udate in a given rangestatic class
Publication.UserContentSelector
UserContentSelector selects all publications which are UGC (UserContent).static class
Publication.VisibleStateSelector
VisibleStateSelector selects all the publications which are in a visible statestatic class
Publication.VoteScoreComparator<T extends Publication>
Comparator to compare Publication using their score based the score of votes (positive votes - negative votes)static class
Publication.WorkspaceAuthorSelector
WorkspaceAuthorSelector selects all the publication the given member is the author and which belong to the given workspace.static class
Publication.WorkspaceComparator<T extends Publication>
static class
Publication.WorkspaceSelector
WorkspaceSelector selects all the publications which belong to the given workspace.-
Nested classes/interfaces inherited from class com.jalios.jcms.Data
Data.AuthorSelector, Data.CdateSelector, Data.DataNameComparator<T extends Data>, Data.DeletableSelector, Data.ImportSelector, Data.MdateSelector, Data.OpAuthorComparator<T extends Data>, Data.RowIdComparator<T extends Data>, Data.StrongLockSelector
-
Nested classes/interfaces inherited from class com.jalios.jstore.BasicStorable
BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACL_CAN_ATTACH_WS
protected java.util.Date
adate
protected java.util.Set<Workspace>
attachWorkspaceSet
protected static java.lang.String
ATTACHWS_CHECK_PUB_RIGHTS_PROP
protected java.util.TreeSet<Group>
authorizedGroupSet
protected java.util.TreeSet<Member>
authorizedMemberSet
protected java.util.HashSet<java.lang.String>
authorizedMemberSetDBID
protected Category[]
categories
protected java.util.TreeSet<Category>
categorySet
protected int
classificationLevel
static int
CTRL_TOPIC_ADVANCED
static int
CTRL_TOPIC_CATEGORIES
static int
CTRL_TOPIC_WORKFLOW
static java.lang.String
CTX_PSTATUS_UPDATE
protected java.util.Set<java.lang.String>
dbFriendlyURLSet
protected boolean
dbFriendlyURLSetInit
protected java.util.Date
edate
protected boolean
extendedReadRightsDBData
protected java.util.TreeSet<java.lang.String>
friendlyURLSet
protected boolean
hasAttachWS
protected boolean
hasNoReadRightsDBData
protected boolean
hasNoReadRightsDBDataInitialized
protected static PublicationIndexManager
indexMgr
protected boolean
isTracked
protected Publication
mainInstance
protected java.lang.String
mainInstanceId
protected java.lang.String
mainLanguage
protected int
majorVersion
protected java.util.Date
mergeDate
protected java.lang.String
mergeId
protected int
minorVersion
protected java.util.Date
pdate
protected int
pstatus
static java.lang.String
PUBLICATION_WFNOTE
protected boolean
readAck
protected int
readerCount
protected boolean
restrictUpdateRights
protected java.util.HashMap<java.lang.String,java.util.TreeSet<Member>>
roleMap
protected java.util.Date
sdate
protected static java.lang.String
SYNC_ATTACH_WORKSPACE_MEDIA_ENABLED_PROP
protected java.lang.String[]
templates
protected java.lang.String
title
protected java.util.HashMap<java.lang.String,java.lang.String>
titleML
protected java.util.Date
udate
protected java.util.TreeSet<Group>
updateGroupSet
protected java.util.TreeSet<Member>
updateMemberSet
protected int
voteCount
protected int
voteScore
protected java.lang.String
weakDataImage
protected AlarmEntry
wfExpressAlarmEntry
protected AlarmEntry
wfReminderAlarmEntry
protected java.lang.String
workflowId
protected Workspace
workspace
protected java.lang.String
workspaceId
-
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 void
ackRead(Member mbr)
Confirm the read of this publication by the given member.void
addAuthorizedGroup(Group grp)
Add an authorized groupvoid
addAuthorizedMember(Member mbr)
Add an authorized member.void
addCategory(Category cat)
Add the given category to the categories of this publicationvoid
addFollower(Member mbr)
Adds a follower for this publication.void
addWeakReferrer(Publication referrer)
Add a weak referrer.void
addWFExpressAlarm()
Adds a WFExpress alarm for this publication (only for main leader replica).void
addWFReminderAlarm()
Adds a WFReminder alarm for this publication (only for main leader replica).void
assignCommonPublicationFields(Publication pub)
Assign all the common fields (author, workspace, pstatus, pdate, ...) of this publication from the given one.void
assignRole(java.lang.String roleId, Member mbr)
Assigns a member to a rolevoid
assignRole(java.lang.String roleId, java.util.TreeSet<Member> mbrSet)
boolean
attachPublication(java.lang.String fieldName, Publication attachment)
Attaches the given publication to the given field of this publication.ControllerStatus
attachTo(Workspace attachWorkspace, java.util.Set<Category> catSet, Member mbr)
Attaches this publication to the given workspace with the given categories.boolean
canBeArchived(Member mbr)
Check if the publication can be archived by the given member.ControllerStatus
canBeArchived(Member mbr, java.util.Map context)
Returns a ControllerStatus indicating if this publication can be archived or notboolean
canBeAttachedBy(Member mbr)
Returns true if the given member can attach this publication to another workspace.boolean
canBeAttachedTo(Workspace attachWorkspace, Member mbr)
Returns true if the given member can attach this publication to the given workspace.boolean
canBeDetachedFrom(Workspace attachWorkspace, Member mbr)
Returns true if the given member can detach this publication from the given workspace.boolean
canBeEditedFieldByField(Member mbr)
Returns true if this publication can be edited field by field on the front-office by the given member.boolean
canBeFollowedBy(Member mbr)
Returns true if the given member can follow this publicationboolean
canBeReadBy(Group group)
Deprecated.since JCMS-8577boolean
canBeReadBy(Group group, RightInfo rightInfo)
Deprecated.since JCMS-8577boolean
canBeReadBy(Member member, boolean searchInGroups)
Check if a member can read this publication.boolean
canBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
Checks if the specified member is authorized to read this Publication.boolean
canBeVotedBy(Member mbr)
boolean
canCreateCopy(Member mbr)
Returns true if the given member can create a copy of this publicationboolean
canCreateCopy(Member mbr, boolean isWorkCopy)
Returns true if the given member can create a copy of this publicationboolean
canCreateCopy(Member mbr, Workspace targetWorkspace)
Returns true if the given member can create a copy of this publicationboolean
canCreateWorkCopy(Member mbr)
Returns true if the given member can create a work copy of this publicationboolean
canMergeWorkCopy(Member mbr)
Returns true if the given member can merge this work copy with it's main instanceboolean
canRequestUnlock(Member mbr)
Returns true if the given member can request to unlock this data.ControllerStatus
checkAndPerformTrash(Member opAuthor, java.util.Map context)
Check if publication can be put in trash, and do it if possible and authorized.ControllerStatus
checkAndPerformUntrash(Member opAuthor, java.util.Map context)
Check if publication can be removed from trash, and do it if possible and authorized.ControllerStatus
checkCreate(Member mbr, java.util.Map context)
Checks if the creation can be performedControllerStatus
checkDelete(Member mbr, java.util.Map context)
Checks if the deletion can be performedControllerStatus
checkIntegrity()
Checks whether or not data integrity constraints are respected.boolean
checkLang(java.lang.String lang)
Check if the publication is available for the given language.ControllerStatus
checkMember(int op, Member mbr, java.util.Map context)
Checks if the given member can perform the given operation.ControllerStatus
checkMerge(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 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.ControllerStatus
checkTrash(Member opAuthor, java.util.Map context)
Check this publication can be trashed given its current state and authorization of specified member.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.ControllerStatus
checkUpdate(Member mbr, java.util.Map context)
Checks if the update can be performedControllerStatus
checkWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)
Checks if the given write operation can be performedprotected void
cleanHybridCollections()
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.void
clearTransientIndex()
Clear all the transient fields that contains indexes.void
cloneDBDataCollections()
java.lang.String
computeSignature()
Deprecated.use #computeSignature(boolean, boolean)java.lang.String
computeSignature(boolean includePublicationFields, boolean hash)
Compute the signature of this publication.boolean
containsCategory(Category category)
This convenient method returns true if the publication contains a given category.Publication
createCopy(Member mbr)
Creates a copy from this publicationPublication
createCopy(Member mbr, java.util.Map context)
Creates a copy from this publicationboolean
createWFNote(Member mbr, int newPstatus, int oldPstatus, java.lang.String note)
Create/Update a WFNote and check if the transition can be performed.boolean
createWFNote(Member mbr, int newPstatus, java.lang.String note)
Create/Update a WFNote and check if the transition can be performed.Publication
createWorkCopy(Member mbr)
Creates a work copy for this publicationPublication
createWorkCopy(Member mbr, java.util.Map context)
Creates a work copy for this publicationControllerStatus
detachFrom(Workspace attachWorkspace, Member mbr)
Detaches this publication for the given attachWorkspace.void
discardCopy(Publication copy)
This method is called when the creation of copy or a work copy of this publication has failed.void
exportXmlField(java.lang.StringBuffer sb, int indentLevel)
Fills the given StringBuffer with Xml export of fields of this data.protected void
exportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)
java.lang.String
getAbstract()
Returns the abstract of this publication in the channel's main language.java.lang.String
getAbstract(java.lang.String lang)
Returns the abstract of this publication.java.lang.String
getAbstract(java.lang.String lang, boolean useDefault)
Returns the abstract of this publication.java.lang.String
getAbstractAsText(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.int
getAccessCount()
java.util.Date
getAdate()
Retrieve the archiving date of this publication.static <T extends Publication>
java.util.Comparator<T>getAdateComparator()
static Publication.AdateSelector
getAdateSelector(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.String
getAllWikiText()
Returns a String which contains the concatenation of all the wiki fields.java.lang.String
getAllWysiwygText()
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.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, ...")static <T extends Publication>
java.util.Comparator<T>getAudienceRightComparator()
static Publication.AudienceRightSelector
getAudienceRightSelector()
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.AuthorizedSelector
getAuthorizedSelector(Member member)
static Publication.CanWorkOnSelector
getCanWorkOnSelector(Member member)
Category[]
getCategories()
Retrieve the categories of this publication.Category[]
getCategories(Member member)
Returns the categories of the publication the member can 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.int
getClassificationLevel()
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.Comparator
getComparator(java.lang.String str, boolean reverse)
Deprecated.static java.util.Comparator
getComparator(java.lang.String str, boolean reverse, QueryResultSet queryResultSet)
Deprecated.static java.lang.String
getCSVHeader(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.String
getDataIcon()
Returns source information for the icon associated to this Data, either a relative path or sprite classes name.java.lang.String
getDataIconTitle(java.lang.String lang)
Returns the icon's tooltip.java.lang.String
getDataImage()
Returns a data image of this publication based on the image contains in its wiki or wysiwyg fields.java.lang.String
getDataName(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.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.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.static DataSelector
getDateSelector(java.lang.String str, java.util.Date begin, java.util.Date end)
Retrieves a newDataSelector
given a name representing it.DBDataRevision
getDBDataRevision(Data data, int op)
java.util.Set<java.lang.String>
getDbFriendlyURLSet()
static <T extends Publication>
java.util.Comparator<T>getDdateComparator()
java.lang.String
getDefaultTemplateUsage()
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 parameterincludingParent
is 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 parameterincludingParent
is true.java.lang.String
getDisplayTemplateFile()
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.Date
getEdate()
Retrieve the expiration date of this publication.static <T extends Publication>
java.util.Comparator<T>getEdateComparator()
static Publication.EdateSelector
getEdateSelector(java.util.Date begin, java.util.Date end)
int
getEffectiveClassificationLevel()
Retrieve the effective classification level of this publication using baseline classification level configured on site.int
getEstimatedReminderCount()
Returns an estimation of how many reminders have been sent since this publication is in this state.boolean
getExtendedReadRights()
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> 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.java.lang.Object
getFieldValue(java.lang.String fieldName, java.lang.String lang, boolean useDefault)
Gets the value of the givenObject
field name for the currentData
.Category
getFirstDescendantCategory(Category parent)
This convenient method returns the first category of the set returned by getDescendantCategorySet.Category
getFirstDescendantCategory(Category parent, boolean includingParent)
This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameterincludingParent
is true and the current publication hasparent
as category.Category
getFirstDescendantCategory(Category parent, boolean includingParent, Member member)
This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameterincludingParent
is true and the current publication hasparent
as 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.String
getGenericThumbnail()
Returns a generic thumbnail for this Data.boolean
getHasAttachWS()
Returns true if this publication is attached to other workspaces.boolean
getHasNoReadRights()
Do not call this method.Publication
getImportConflictCopy()
Returns the conflict copy bound to this imported publication (or null if there is no conflict copy).java.lang.String
getImportVersion()
Get the value of importVersion.java.util.Date
getIndexingDate()
Retrieve the Date at which this Publication was indexed in its search engine.Workflow
getInternalWorkflow()
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.Publication
getMainInstance()
If this publication is a work copy then return the main instancejava.lang.String
getMainInstanceId()
java.lang.String
getMainLanguage()
Get the value of main language.int
getMajorVersion()
Returns the major version.java.util.TreeSet<Member>
getMemberSetAssignedToRole(java.lang.String roleId)
Returns the member bound to the given role.java.util.Date
getMergeDate()
Returns the date of the last merge with a work copy.java.lang.String
getMergeId()
Returns the id of the work copy used for the last merge.int
getMinorVersion()
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.Date
getPdate()
Retrieve the publication date of this publication.static <T extends Publication>
java.util.Comparator<T>getPdateComparator()
static Publication.PdateSelector
getPdateSelector(java.util.Date begin, java.util.Date end)
int
getPopularity()
static <T extends Publication>
java.util.Comparator<T>getPopularityComparator()
int
getPstatus()
Get the value of pstatus.AlarmEntry
getPstatusAlarmEntry(int pstatus)
Get the alarmEntry bound to a given pstatusstatic <T extends Publication>
java.util.Comparator<T>getPstatusComparator()
static Publication.PstatusSelector
getPstatusSelector(int pstatus)
static Publication.PstatusSelector
getPstatusSelector(int pstatus, int greater)
java.lang.String
getQueryTemplateFile()
Deprecated.Must call instead getTemplatePath()boolean
getReadAck()
Returns true if read acknowledge is mandatory on this publication.int
getReadAckCount()
Returns the count of member who confirm the reading of this publication.static <T extends Publication>
java.util.Comparator<T>getReaderComparator()
int
getReaderCount()
ReaderTracker
getReaderTracker(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.ReadRightSelector
getReadRightSelector()
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, ...")java.util.Set
getReferrerSet(boolean searchInDB)
Returns the referrer set of this data.boolean
getRestrictUpdateRights()
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.String
getRoleMapStr()
Returns the encoded String from the current roleMap (only used for DBData property mapping)java.util.Date
getSdate()
Retrieve the sort date of this publication.static <T extends Publication>
java.util.Comparator<T>getSdateComparator()
static Publication.SdateSelector
getSdateSelector(java.util.Date begin, java.util.Date end)
java.lang.String[]
getSearchStrings()
Searchable implementationjava.lang.String
getTemplate(java.lang.String usage)
Returns the template name for the given usageTypeTemplateEntry
getTemplateEntry(java.lang.String usage, boolean devModeChecks)
Returns the TypeTemplateEntry matching the given parameters.static TypeTemplateEntry
getTemplateEntry(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.String
getTemplatePath(JcmsJspContext ctxt)
Returns the template path for the current contextjava.lang.String
getTemplatePath(java.lang.String usage, boolean devModeChecks)
Returns the template path for the given usagejava.lang.String[]
getTemplates()
Get the value of templates.java.lang.String
getTitle()
Retrieve the title of this publication in the main site language.java.lang.String
getTitle(java.lang.String lang)
Get the value of title bound to the given language.java.lang.String
getTitle(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.String
getTitleMLE()
Returns the encoded titleML.static Publication.TrackedSelector
getTrackedSelector()
java.util.Collection<? extends TreeNode>
getTreeChildren()
Returns a Collection of TreeNode children of the current nodeTreeNode
getTreeParent()
Returns parent of the current nodeTreeNode
getTreeRoot()
Returns the root of the current nodestatic <T extends Publication>
java.util.Comparator<T>getTypeComparator()
java.lang.String
getTypeFieldLabel(java.lang.String fieldName, java.lang.String lang)
Returns the localized label of the given field of the given publication.java.lang.String
getTypeLabel(java.lang.String lang)
Returns the label of the type of this publication.java.util.Date
getUdate()
Returns the date of last major update.static <T extends Publication>
java.util.Comparator<T>getUdateComparator()
static Publication.UdateSelector
getUdateSelector(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.String
getVersionString()
Returns the current version (major.minor) of this publication.static Publication.VisibleStateSelector
getVisibleStateSelector()
int
getVoteCount()
int
getVoteScore()
static <T extends Publication>
java.util.Comparator<T>getVoteScoreComparator()
int
getVoteValue()
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.WFState
getWFState()
Returns the WFState bound to the current pstatus or null if nonejava.lang.String
getWFStateLabel(java.lang.String lang)
This convenient method returns the Workflow's state label this publication is in.java.lang.String
getWFStateLabelHtml(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.Workflow
getWorkflow()
Returns the Workflow bound to this publicationjava.lang.String
getWorkflowId()
Returns the internal workflow id if set (only worklow instance, not workflow associated with the publication class)Workspace
getWorkspace()
static Publication.WorkspaceAuthorSelector
getWorkspaceAuthorSelector(Workspace workspace, Member author)
static <T extends Publication>
java.util.Comparator<T>getWorkspaceComparator(java.lang.String lang)
java.lang.String
getWorkspaceId()
Returns the JStore ID of the workspace (only for DBData)static Publication.WorkspaceSelector
getWorkspaceSelector(Workspace workspace)
WSTypeEntry
getWSTypeEntry()
This method return a WSTypeEntry for the current workspace in the current class.WSTypeEntry
getWSTypeEntry(Workspace wrkspc)
This method return a WSTypeEntry for the given workspace in the current class.boolean
hasAlreadyVoted(Member member)
Check if the given member has already voted for this publicationboolean
hasAnyReadRights()
Tests if this publication has member or group read rights.boolean
hasBeenReadAckBy(Member mbr)
Returns true if the given member has confirmed the reading of this publication.boolean
hasBeenReadBy(Member mbr)
Check if the given member has read this publicationboolean
hasCategory(Category cat)
Test if a publication references a given category.boolean
hasImportConflict()
Returns true if this imported publication has a conflict copy.boolean
hasNoReadRights()
Tests if this publication has NO member read rights AND NO group read rights.boolean
hasWeakReferrers()
Returns true if this publication has weak referrers.void
importConvertToLocal(Member opAuthor)
Converts this imported publication to a local datavoid
importMarkAsMerged(Member opAuthor)
Merges all the import extra data (import date, import version, ....) of the most recent conflict copy with the original.void
importOverrideAndUpdate(Member opAuthor)
Ignores all the local changes and replaces the local imported data with the conflict copy.void
importXml(org.jdom.Element elt, ImportOptions options)
Fill this data with the values contains in the JDOM element.void
init(Member author, Workspace ws)
This method initialise the object with default values for the given workspace: Default categories Default Authorized groups Default Pstatus Given Workspace Given Author and opAuthorvoid
initCopy(Member newAuthor)
Initialize this publication once it has been cloned for a copy (eg by duplicate.jsp)void
initializeDBDataCollections()
This methods force the collections of the DBData to be initialized()protected boolean
internalCanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
void
invalidateWeakDataImage()
boolean
isAudienced()
Check if this publication is Audienced.boolean
isClassified()
Check if this publication is classified.boolean
isDefaultTemplate(java.lang.String usage)
Checks if the publication use a default template for the given usageboolean
isFollowedBy(Member mbr)
Returns true if the given member follows this publication.boolean
isImportConflictCopy()
Returns true if this publication is an import conflict copy.boolean
isInRole(java.lang.String roleId, Member mbr)
Determines whether the given member can use the given role for this publicationboolean
isInVisibleState()
Returns true if this publication is in a visible stateboolean
isPublic()
Returns true is this publication can be read by any one.boolean
isRoleAssigned(java.lang.String roleId)
Determines whether there exists at least one member assigned to the given roleboolean
isTracked()
Check if a the publication's readers are trackedboolean
isTrashed()
boolean
isTreeLeaf()
Returns boolean true if the TreeNode is a leafboolean
isTreeNode()
Returns boolean true if the TreeNode is a nodeboolean
isUserContent()
Returns true if this data is User Content.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.boolean
isVersioned()
Returns true if the current Publication is versioned (is stored or is instance of HistorizedDBData)boolean
isVotable()
boolean
isWorkCopy()
Checks if this publication is a working copy.void
majorUpdate()
Increments the major versionvoid
notifyFollowers(Member opAuthor, java.util.Map context)
Notify all the follower of this publication.protected void
performAfterWrite(int op, Member mbr, java.util.Map context)
Called to perform some action after the write.protected void
performBeforeWrite(int op, Member mbr, java.util.Map context)
Called to perform some action before the write.void
performCreate(Member mbr, java.util.Map context)
Performs data creationvoid
performDelete(Member mbr, java.util.Map context)
Performs data deletionvoid
performMerge(Member mbr)
Performs publication mergevoid
performMerge(Member mbr, java.util.Map context)
Performs publication mergevoid
performTrash(Member opAuthor, java.util.Map context)
Put this put publication in the trash.void
performUntrash(Member opAuthor, java.util.Map context)
Remove this publication from the trash.void
performUpdate(Member mbr, java.util.Map context)
Performs data updateprotected void
prepareMergeCopy(Publication mergeCopy)
void
putPstatusAlarmEntry(int pstatus, AlarmEntry alarmEntry)
Bind an AlarmEntry to a given pstatusvoid
recomputeScore()
Recompute the score of the publicationvoid
removeAllDescendants(Member opAuthor, java.util.Map context)
Remove all descendant TreeNode that can be deletedvoid
removeAllFollowers()
Removes all the follower for this publication.void
removeAllReaderTracker(Member opAuthor)
Remove all the readers notesboolean
removeAuthorizedGroup(Group grp)
Remove an authorized group.boolean
removeAuthorizedMember(Member mbr)
Remove an authorized member.void
removeCategory(Category cat)
Remove the specified category from this publication's categoriesprotected void
removeDataSet(Member opAuthor, java.util.Set<? extends Data> dataSet)
Remove all the data of the given data setvoid
removeFollower(Member mbr)
Removes the given follower for this publication.void
removeImportMetadata()
Remove all the import metadata on this publicationAlarmEntry
removePstatusAlarmEntry(int pstatus)
Remove an AlarmEntry to a given pstatusvoid
removeWeakReferrer(Publication referrer)
Remove a weak referrer.void
removeWFExpressAlarm()
Removes the WFExpress alarm for this publication.void
removeWFReminderAlarm()
Removes the WFExpress alarm for this publication.protected static TypeTemplateEntry
resolveTypeTemplateEntry(WSTypeEntry wste, java.lang.String usage, java.lang.String[] templates)
ReturnsTypeTemplateEntry
matching given parameters.void
setAbstract(java.lang.String value)
Set the value of the Abstract field in the main language (default site language or any other).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.void
setAdate(java.util.Date v)
Set the archiving date of this publication.void
setAllCatIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method.void
setAttachWorkspaceSet(java.util.Set<Workspace> attachWorkspaceSet)
Set the attachWorkspaceSetvoid
setAttachWSIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method.void
setAuthGrpIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method.void
setAuthMbrIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method.void
setAuthorizedGroupSet(java.util.TreeSet<Group> groupSet)
Set the set of Group authorized to read this Publication.void
setAuthorizedMemberSet(java.util.TreeSet<Member> memberSet)
Set the set of Member authorized to read this Publication.void
setAuthorizedMemberSetDBID(java.util.HashSet<java.lang.String> v)
void
setCategories(Category[] cats)
Set categories of this publication.void
setCategorySet(java.util.Set<Category> catSet)
Replaces the current categories with this set of categories.void
setCatIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method.void
setCdate(java.util.Date cdate)
Set the cdate and update the udatevoid
setClassificationLevel(java.lang.Integer level)
Set the classification level of this publication.void
setDbFriendlyURLSet(java.util.Set<java.lang.String> v)
void
setEdate(java.util.Date v)
Set the expiration date of this publication.void
setExtendedReadRights(java.lang.Boolean extendedRights)
Indicate that this DB publication has its read rights potentially extended by a custom right policy.void
setFieldValue(java.lang.String fieldName, java.lang.Object value, java.lang.String lang)
Sets the value of the givenObject
field name for the currentData
.void
setFriendlyURLSet(java.util.TreeSet<java.lang.String> v)
void
setHasAttachWS(java.lang.Boolean v)
Do not call this method.void
setHasNoReadRights(java.lang.Boolean b)
Do not call this method.void
setImportConflictCopy(boolean v)
Set the value of isImportConflictCopy.void
setImportVersion(java.lang.String v)
Set the value of importVersion.void
setMainInstance(Publication mainInstance)
If this publication is a work copy then set it's main instancevoid
setMainInstanceId(java.lang.String v)
void
setMainLanguage(java.lang.String v)
Set the value of main language.void
setMajorVersion(int majorVersion)
Set the major version.void
setMergeDate(java.util.Date mergeDate)
Set the date of the last merge with a work copyvoid
setMergeId(java.lang.String mergeId)
Set the id of the work copy used for the last merge.void
setMinorVersion(int minorVersion)
Set the minor version.void
setPdate(java.util.Date v)
Set the publication date of this publication.void
setPstatus(int v)
Set the value of pstatus.void
setReadAck(java.lang.Boolean v)
If true, read acknowledge is mandatory on this publication.void
setReaderCount(int v)
Do not call this method.void
setRestrictUpdateRights(java.lang.Boolean v)
If true, restrict the update rights to the members declared in updateMemberSet and updateGroupSet.void
setRoleMap(java.util.HashMap<java.lang.String,java.lang.Object> roleMap)
void
setRoleMapStr(java.lang.String str)
Assigns the roleMap from the given encoded String (only used for DBData property mapping)void
setRoleMemberSetMap(java.util.HashMap<java.lang.String,java.util.TreeSet<Member>> roleMap)
void
setSdate(java.util.Date v)
Set the sort date of this publication.void
setTemplate(java.lang.String name)
void
setTemplates(java.lang.String[] v)
Set the value of templates.void
setTitle(java.lang.String v)
Set the title of this publication in the main site language.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.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.void
setTitleMLE(java.lang.String v)
Set the value for the encoded titleMLvoid
setTracked(boolean bool)
Set the track flagvoid
setUdate(java.util.Date udate)
Set the date of last major update.void
setUpdateGroupSet(java.util.TreeSet<Group> groupSet)
Set the Groups whose members are explicitely authorized to update this instance.void
setUpdateGrpIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method.void
setUpdateMbrIdSet(java.util.Set<java.lang.String> idSet)
Do not call this method.void
setUpdateMemberSet(java.util.TreeSet<Member> memberSet)
Set the Members explicitely authorized to update this instance.void
setVoteCount(java.lang.Integer voteCount)
void
setVoteScore(java.lang.Integer voteScore)
void
setWorkflow(Workflow workflow)
void
setWorkflowId(java.lang.String wfId)
Set the internal workflow id (if the id is null, workflow will be workflow associated with publication class)void
setWorkspace(Workspace workspace)
void
setWorkspaceId(java.lang.String v)
Sets the JStore ID of the workspace (only for DBData)protected void
splitHybridCollections(Data previousData)
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.boolean
supportsClassification()
Check if this publication supports being classified.java.lang.String
toCSV(java.lang.String lang)
Returns a CSV view of this objectjava.lang.String
toFullString()
java.lang.String
toString()
void
trackReader(Member mbr)
Track the given reader.void
trackReader(Member mbr, int accessType)
Track the given reader for given access type.void
unassignMember(Member mbr)
Unassign a member from all the role he has been assigned to.void
unassignRole(java.lang.String roleId)
Unassigns a member to a rolejava.lang.StringBuilder
updateDisplayLinkCss(java.lang.StringBuilder builder)
Returns a StringBuilder which contains css, whom you can modify or replace in your subclassesDataAttribute
updateDisplayLinkDataAttribute(DataAttribute dataAttribute)
Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclassesvoid
updatePstatus(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:
getSearchStrings
in 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:Data
Fill 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:Data
Fills the given StringBuffer with Xml export of fields of this data.- Overrides:
exportXmlField
in classData
- Parameters:
sb
- the StringBufferindentLevel
- the indent level
-
exportXmlRelated
protected void exportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)
- Overrides:
exportXmlRelated
in 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:
toFullString
in 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
-Locale
used :- 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 parameterincludingParent
is 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 parameterincludingParent
is true.Check category read rights for the given member.
The set is ordered according the
Category.OrderComparator
using 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 parameterincludingParent
is true and the current publication hasparent
as 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 parameterincludingParent
is true and the current publication hasparent
as 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:
canBeReadBy
in 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
- aRightInfo
instance 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 customRightPolicyFilter
wants 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
mainInstance
field, 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:Data
Returns true if the given member can request to unlock this data.- Overrides:
canRequestUnlock
in 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.:relatedContent
field ofArticle
,faq
field ofFaqEntry
,attachements
,fromMember
,toMember
, ... fields of aDBMailMessage
,children
field of aPortletJspCollection
,memberSet
,groupSet
andlinkedPublication
fields 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)
ReturnsTypeTemplateEntry
matching 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:
getDataImage
in 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:Data
Returns 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:
getDataIcon
in 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:Data
Returns 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:
getDataIconTitle
in 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:Data
Returns 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.thumb
is used.FileDocument uses its own implementation, see
FileDocument.getGenericThumbnail()
.- Overrides:
getGenericThumbnail
in 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:Data
Return 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:
getDataName
in 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:
setCdate
in interfaceStorable
- Overrides:
setCdate
in 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:Data
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Overrides:
splitHybridCollections
in classData
- Parameters:
previousData
- the previous data (provided for update only)
-
cleanHybridCollections
protected void cleanHybridCollections()
Description copied from class:Data
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.- Overrides:
cleanHybridCollections
in 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.TitleComparator
using 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 newComparator
given a name representing it. The returned comparator can be used to sort anyCollection
containingPublication
s.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 newComparator
given a name representing it. The returned comparator can be used to sort anyCollection
containingPublication
s.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
Comparator
to 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.AuthorizedSelector
using the givenMember
. - Since:
- jcms-2.1
-
getCanWorkOnSelector
public static Publication.CanWorkOnSelector getCanWorkOnSelector(Member member)
- Parameters:
member
- the member- Returns:
- a new instance of
Publication.CanWorkOnSelector
using 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.WorkspaceAuthorSelector
using 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.WorkspaceAuthorSelector
using the givenWorkspace
andMember
. - 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.PdateSelector
using 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.SdateSelector
using 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.EdateSelector
using 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.AdateSelector
using 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.UdateSelector
using 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 newDataSelector
given 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 ofData
in 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 beginDate
to use for selectionend
- the endDate
to use for selection- Returns:
- a new instance of
Comparator
. - See Also:
Data.getDateSelector(String, Date, Date)
-
getTrackedSelector
public static Publication.TrackedSelector getTrackedSelector()
- Returns:
- a new instance of
Publication.TrackedSelector
. - Since:
- jcms-5.0.0
-
getAudienceRightSelector
public static Publication.AudienceRightSelector getAudienceRightSelector()
- Returns:
- a new instance of
Publication.AudienceRightSelector
. - Since:
- jcms-5.5.0
-
getReadRightSelector
public static Publication.ReadRightSelector getReadRightSelector()
- Returns:
- a new instance of
Publication.ReadRightSelector
. - Since:
- jcms-5.5.0
-
getTreeChildren
public java.util.Collection<? extends TreeNode> getTreeChildren()
Description copied from interface:TreeNode
Returns a Collection of TreeNode children of the current node- Specified by:
getTreeChildren
in interfaceTreeNode
- Returns:
- Collection of TreeNode
- See Also:
TreeNode.getTreeChildren()
-
getTreeParent
public TreeNode getTreeParent()
Description copied from interface:TreeNode
Returns parent of the current node- Specified by:
getTreeParent
in interfaceTreeNode
- Returns:
- TreeNode parent Node
- See Also:
TreeNode.getTreeParent()
-
isTreeLeaf
public boolean isTreeLeaf()
Description copied from interface:TreeNode
Returns boolean true if the TreeNode is a leaf- Specified by:
isTreeLeaf
in interfaceTreeNode
- Returns:
- boolean indicating if node is leaf or node
- See Also:
TreeNode.isTreeLeaf()
-
isTreeNode
public boolean isTreeNode()
Description copied from interface:TreeNode
Returns boolean true if the TreeNode is a node- Specified by:
isTreeNode
in interfaceTreeNode
- Returns:
- boolean indicating if node is leaf or node
- See Also:
TreeNode.isTreeNode()
-
getTreeRoot
public TreeNode getTreeRoot()
Description copied from interface:TreeNode
Returns the root of the current node- Specified by:
getTreeRoot
in interfaceTreeNode
- Returns:
- TreeNode root Node
-
checkIntegrity
public ControllerStatus checkIntegrity()
Checks whether or not data integrity constraints are respected.- Overrides:
checkIntegrity
in 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:
checkWrite
in 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:
checkMember
in 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:
checkCreate
in 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:
checkUpdate
in 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:
checkDelete
in 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:
performCreate
in 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:
performUpdate
in 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:
performDelete
in 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:Data
Called to perform some action before the write.- Overrides:
performBeforeWrite
in 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:Data
Called to perform some action after the write.- Overrides:
performAfterWrite
in 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.NoSuchFieldException
Gets the value of the givenObject
field name for the currentData
.
If the field is multilingual, the given language will be used.
Do not retrieveCategory
fields, see #getCategoryFieldValue(String, Member).- Overrides:
getFieldValue
in 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
Object
field 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.NoSuchFieldException
Sets the value of the givenObject
field name for the currentData
.
If the field is multilingual, the given language will be used.
Do not retrieveCategory
fields, see #getCategoryFieldValue(String, Member).- Overrides:
setFieldValue
in 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:Data
This methods force the collections of the DBData to be initialized()- Overrides:
initializeDBDataCollections
in 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:Data
Returns a StringBuilder which contains css, whom you can modify or replace in your subclasses- Overrides:
updateDisplayLinkCss
in classData
- Parameters:
builder
- theStringBuilder
- Returns:
- a
StringBuilder
which contains css of display link
-
updateDisplayLinkDataAttribute
public DataAttribute updateDisplayLinkDataAttribute(DataAttribute dataAttribute)
Description copied from class:Data
Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclasses- Overrides:
updateDisplayLinkDataAttribute
in classData
- Parameters:
dataAttribute
- theDataAttribute
- Returns:
- a
DataAttribute
which contains data attributes of display link
-
-