|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jstore.BasicStorable
com.jalios.jcms.Data
com.jalios.jcms.Publication
public abstract class Publication
This abstract class is the super class of all the Publication classes.
Nested Class Summary | |
---|---|
static class |
Publication.AdateComparator
Compares two Publications using their Adate in descending order (newest date first). |
static class |
Publication.AdateSelector
AdateSelector selects all the publications with a adate in a given range |
static class |
Publication.AudienceRightComparator
Comparator to compare Publication using their audience rights. |
static class |
Publication.AudienceRightSelector
AudienceRightSelector selects all publications being audienced. |
static class |
Publication.AuthorComparator
|
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
Compares two Publications using their Ddate in descending order (newest date first). |
static class |
Publication.EdateComparator
Compares two Publications using their Edate in descending order (newest date first). |
static class |
Publication.EdateSelector
EdateSelector selects all the publications with a edate in a given range |
static class |
Publication.PdateComparator
Compares two Publications using their Pdate in descending order (newest date first). |
static class |
Publication.PdateSelector
PdateSelector selects all the publications with a pdate in a given range |
static class |
Publication.PstatusComparator
|
static class |
Publication.PstatusSelector
PstatusSelector selects all the publications with a given pstatus. |
static class |
Publication.RatingComparator
|
static class |
Publication.ReaderComparator
|
static class |
Publication.ReadRightSelector
ReadRightSelector selects all publications which have any read right. |
static class |
Publication.ReviewCountComparator
|
static class |
Publication.RightComparator
|
static class |
Publication.SdateComparator
Compares two Publications using their Sdate in descending order (newest date first). |
static class |
Publication.SdateSelector
SdateSelector select all the publications with a sdate in a given range |
static class |
Publication.TitleComparator
|
static class |
Publication.TrackedSelector
TrackedSelector selects all the publications which are tracked. |
static class |
Publication.TypeComparator
|
static class |
Publication.UdateComparator
Compares two Publications using their udate in descending order (newest date first). |
static class |
Publication.UdateSelector
UdateSelector selects all the publications with a udate in a given range |
static class |
Publication.UserContentSelector
UserContentSelector selects all publications which are UGC (UserContent). |
static class |
Publication.VisibleStateSelector
VisibleStateSelector selects all the publications which are in a visible state |
static class |
Publication.WorkspaceAuthorSelector
WorkspaceAuthorSelector selects all the publication the given member is the author and which belong to the given workspace. |
static class |
Publication.WorkspaceComparator
|
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, Data.DeletableSelector, Data.ImportSelector, Data.MdateSelector, Data.OpAuthorComparator |
Nested classes/interfaces inherited from class com.jalios.jstore.BasicStorable |
---|
BasicStorable.CdateComparator, BasicStorable.IdComparator, BasicStorable.MdateComparator |
Fields inherited from class com.jalios.jcms.Data |
---|
author, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, lockDate, lockMember, opAuthor, opDelegate |
Fields inherited from class com.jalios.jstore.BasicStorable |
---|
cdate, ddate, id, mdate, store |
Fields inherited from interface com.jalios.jcms.mashup.ImportConstants |
---|
IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_PROP |
Fields inherited from interface com.jalios.jcms.mashup.MashupConstants |
---|
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Constructor Summary | |
---|---|
Publication()
|
|
Publication(Publication other)
|
Method Summary | |
---|---|
void |
addAuthorizedGroup(Group grp)
Add an authorized group |
void |
addAuthorizedMember(Member mbr)
Add an authorized member. |
void |
addCategory(Category cat)
Add the given category to the categories of this publication |
void |
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, ...) |
void |
assignRole(String roleId,
Member mbr)
Assigns a member to a role |
boolean |
canBeArchived(Member mbr)
Check if the publication can be archived by the given member. |
ControllerStatus |
canBeArchived(Member mbr,
Map context)
Returns a ControllerStatus indicating if this publication can be archived or not |
boolean |
canBeEditedFieldByField(Member mbr)
Returns true if this publication can be edited field by field on the front-office by the given member. |
boolean |
canBeReadBy(Group group)
Checks if a group can read this publication. |
boolean |
canBeReadBy(Member member)
This convenient method is the same that canBeReadBy(member, true). |
boolean |
canBeReadBy(Member member,
boolean searchInGroups)
Check if a member can read this publication. |
boolean |
canCreateCopy(Member mbr)
Returns true if the given member can create a copy of this publication |
boolean |
canCreateCopy(Member mbr,
boolean isWorkCopy)
Returns true if the given member can create a copy of this publication |
boolean |
canCreateWorkCopy(Member mbr)
Returns true if the given member can create a work copy of this publication |
boolean |
canMergeWorkCopy(Member mbr)
Returns true if the given member can merge this work copy with it's main instance |
ControllerStatus |
checkCreate(Member mbr,
Map context)
Checks if the creation can be performed |
ControllerStatus |
checkDelete(Member mbr,
Map context)
Checks if the deletion can be performed |
ControllerStatus |
checkIntegrity()
Checks whether or not data integrity constraints are respected. |
boolean |
checkLang(String lang)
Check if the publication is available for the given language. |
ControllerStatus |
checkMember(int op,
Member mbr,
Map context)
Checks if the given member can perform the given operation. |
ControllerStatus |
checkMerge(Member mbr,
Map context)
Checks if the merge can be performed |
Object[] |
checkStateChange(Member mbr,
int pstatus)
Checks if the state change can be performed (it checks if the transition's rule can be perfomed) |
protected static boolean |
checkTemplateEntry(TypeTemplateEntry tte,
String usage,
boolean devModeChecks,
String label)
Checks if the given TypeTemplateEntry is matching dev modes In developpement mode it throws exception if template is null or jsp is missing In production mode it returns default template if template is null but do not check if JSP template exists to improve performances. |
ControllerStatus |
checkUpdate(Member mbr,
Map context)
Checks if the update can be performed |
ControllerStatus |
checkWrite(int op,
Member mbr,
boolean checkIntegrity,
Map context)
Checks if the given write operation can be performed |
void |
clearTransientIndex()
Clear all the transient fields that contains indexes. |
String |
computeSignature()
Compute the signature (MD5) of this publication. |
boolean |
containsCategory(Category category)
This convenient method returns true if the publication contains a given category. |
Publication |
createCopy(Member mbr)
Creates a copy from this publication |
boolean |
createWFNote(Member mbr,
int pstatus,
String note)
Create/Update a WFNote and check if the transition can be performed. |
Publication |
createWorkCopy(Member mbr)
Creates a work copy for this publication |
void |
exportXmlField(StringBuffer sb,
int indentLevel)
Fills the given StringBuffer with Xml export of fields of this data. |
String |
getAbstract()
Returns the abstract of this publication in the channel's main language. |
String |
getAbstract(String lang)
Returns the abstract of this publication. |
String |
getAbstract(String lang,
boolean useDefault)
Returns the abstract of this publication. |
HashMap<String,String> |
getAbstractML()
Returns the map containing abstracts of this publication in all language but the channel's main language. |
int |
getAccessCount()
|
Date |
getAdate()
Retrieve the archiving date of this publication. |
static Comparator |
getAdateComparator()
|
static Publication.AdateSelector |
getAdateSelector(Date begin,
Date end)
|
String |
getAllWikiText()
Returns a String which contains the concatenation of all the wiki fields. |
String |
getAllWysiwygText()
Returns a String which contains the concatenation of all the wysiwyg fields. |
String |
getAudiencedRightsString(String userLang,
int max)
This convenient method returns a String displaying categories used by audience right (eg if this publication is restricted to member, g2, m1, m2 and m3, getReadRightsString(3) will return "g1, g2, m1, ...") |
static Comparator |
getAudienceRightComparator()
|
static Publication.AudienceRightSelector |
getAudienceRightSelector()
|
Set<Group> |
getAuthorizedGroupSet()
Get the set of Group authorized to read this Publication. |
Set<Member> |
getAuthorizedMemberSet()
Get the set of Member authorized to read this Publication. |
static Publication.AuthorizedSelector |
getAuthorizedSelector(Member member)
|
static Publication.CanWorkOnSelector |
getCanWorkOnSelector(Member member)
|
Category[] |
getCategories()
Retrieve the categories of this publication. |
Category[] |
getCategories(Member member)
Returns the categories of the publication the member can read |
TreeSet<Category> |
getCategorySet()
Returns the categories of this publication as a Set. |
static Comparator |
getComparator(String str,
boolean reverse)
Retrieves a new Comparator given a name representing
it. |
static Comparator |
getComparator(String str,
boolean reverse,
QueryResultSet queryResultSet)
Retrieves a new Comparator given a name representing
it. |
static String |
getCSVHeader(String lang)
Returns the CSV header of this object |
String |
getDataName(String language)
Return the name of this Data, every sub class Data which will be displayed to user should implements this method already. |
Date |
getDate(String dateType)
Return the date corresponding to the given parameter : date/cdate, mdate, edate, pdate, sdate, adate, udate or null if nothing match or the matching date is null. |
Date |
getDate(String dateType,
Date defaultDate)
Return the date corresponding to the given parameter : date/cdate, mdate, edate, pdate, sdate, adate, udate, or null if nothing match or the matching date is null. |
static DataSelector |
getDateSelector(String str,
Date begin,
Date end)
Retrieves a new DataSelector given a name representing
it. |
static Comparator |
getDdateComparator()
|
String |
getDefaultTemplateUsage()
Returns the default template usage used to display the publication. |
TreeSet<Category> |
getDescendantCategorySet(Category parent)
Return the set of category of this publication which are the descendant category of a given parent category. |
TreeSet<Category> |
getDescendantCategorySet(Category parent,
boolean includingParent)
Return the set of category of this publication which are the descendant category of a given parent category, including the given parent category in case the parameter includingParent is true. |
TreeSet<Category> |
getDescendantCategorySet(Category parent,
boolean includingParent,
Member member)
Return the set of category of this publication which are the descendant category of a given parent category, including the given parent category in case the parameter includingParent is true. |
String |
getDisplayTemplateFile()
Deprecated. Must call instead getTemplatePath() |
Set<FileDocument> |
getDocumentLinkSet()
Returns the set of documents attached to this publication. |
Date |
getEdate()
Retrieve the expiration date of this publication. |
static Comparator |
getEdateComparator()
|
static Publication.EdateSelector |
getEdateSelector(Date begin,
Date end)
|
int |
getEstimatedReminderCount()
Returns an estimation of how many reminders have been sent since this publication is in this state. |
Set<String> |
getExternalLinkSet()
Returns all the external link contains in this publication. |
Object |
getFieldInMainLanguage(Object field,
HashMap fieldML)
|
Object |
getFieldValue(String fieldName,
String lang,
boolean useDefault)
Gets the value of the given Object field name for the current Data . |
Category |
getFirstDescendantCategory(Category parent)
This convenient method returns the first category of the set returned by getDescendantCategorySet. |
Category |
getFirstDescendantCategory(Category parent,
boolean includingParent)
This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameter includingParent is true and the
current publication has parent as category. |
Category |
getFirstDescendantCategory(Category parent,
boolean includingParent,
Member member)
This convenient method returns the first category of the set returned by getDescendantCategorySet, including the parent in case parameter includingParent is true and the current publication has parent
as category. |
TreeSet<String> |
getFriendlyURLSet()
Get friendly urls Set. |
int |
getGlobalRating()
Return the the average rating of all reviews on this publication. |
Publication |
getImportConflictCopy()
Returns the conflict copy bound to this imported publication (or null if there is no conflict copy). |
String |
getImportVersion()
Get the value of importVersion. |
Date |
getIndexingDate()
Retrieve the Date at which this Publication was indexed in its search engine. |
TreeSet |
getLinkDataSet(Class clazz)
Retuns all the data, instance of a given class, targeted by this publication through its link field (ie the link defined with the Type Editor. |
Publication |
getMainInstance()
If this publication is a work copy then return the main instance |
String |
getMainLanguage()
Get the value of main language. |
int |
getMajorVersion()
Returns the major version. |
Member |
getMemberAssignedToRole(String roleId)
Returns the member bound to the given role. |
Date |
getMergeDate()
Returns the date of the last merge with a work copy. |
String |
getMergeId()
Returns the id of the work copy used for the last merge. |
int |
getMinorVersion()
Returns the minor version. |
Set<WFState> |
getNextWFStateSet(Member member)
Returns the set of WFState the given member can put this publication in, according the rights of the member, the workflow and the current state of the publication. |
Date |
getPdate()
Retrieve the publication date of this publication. |
static Comparator |
getPdateComparator()
|
static Publication.PdateSelector |
getPdateSelector(Date begin,
Date end)
|
int |
getPstatus()
Get the value of pstatus. |
AlarmEntry |
getPstatusAlarmEntry(int pstatus)
Get the alarmEntry bound to a given pstatus |
static Comparator |
getPstatusComparator()
|
static Publication.PstatusSelector |
getPstatusSelector(int pstatus)
|
static Publication.PstatusSelector |
getPstatusSelector(int pstatus,
int greater)
|
String |
getQueryTemplateFile()
Deprecated. Must call instead getTemplatePath() |
static Comparator |
getRatingComparator()
|
static Comparator |
getReaderComparator()
|
int |
getReaderCount()
|
List<ReaderTracker> |
getReaderTrackerList()
Returns the reader list for the given publication. |
static Publication.ReadRightSelector |
getReadRightSelector()
|
String |
getReadRightsString(int max)
This convenient method returns a String displaying group/member read rights (eg if this publication is restricted to g1, g2, m1, m2 and m3, getReadRightsString(3) will return "g1, g2, m1, ...") |
AbstractReview |
getReview(Member author)
Retrieves the review written by the given author and bound to this publication. |
int |
getReviewCount()
Returns how many review are attached to this publication. |
static Comparator |
getReviewCountComparator()
|
List<AbstractReview> |
getReviewList()
Retrieves all the reviews bound to this publication. |
List<AbstractReview> |
getReviewList(Member mbr)
Retrieves all the reviews bound to this publication that the given member can access. |
static Comparator |
getRightComparator()
|
HashMap<String,Member> |
getRoleMap()
|
Date |
getSdate()
Retrieve the sort date of this publication. |
static Comparator |
getSdateComparator()
|
static Publication.SdateSelector |
getSdateSelector(Date begin,
Date end)
|
String[] |
getSearchStrings()
Searchable implementation |
String |
getTemplate(String usage)
Returns the template name for the given usage |
TypeTemplateEntry |
getTemplateEntry(String usage,
boolean devModeChecks)
Returns the TypeTemplateEntry matching the given parameters. |
static TypeTemplateEntry |
getTemplateEntry(String usage,
boolean devModeChecks,
Class<? extends Data> clazz,
Workspace ws)
Returns the TypeTemplateEntry matching the given parameters. |
Set<TypeTemplateEntry> |
getTemplateEntrySet()
Returns a Set of TypeTemplateEntry matching current publication templates |
String |
getTemplatePath(JcmsJspContext ctxt)
Returns the template path for the current context |
String |
getTemplatePath(String usage,
boolean devModeChecks)
Returns the template path for the given usage |
String[] |
getTemplates()
Get the value of templates. |
String |
getTitle()
Retrieve the title of this publication in the main site language. |
String |
getTitle(String lang)
Get the value of title bound to the given language. |
String |
getTitle(String lang,
boolean useDefault)
Get the value of title bound to the given language. |
static Comparator |
getTitleComparator()
|
static Comparator |
getTitleComparator(String lang)
|
HashMap<String,String> |
getTitleML()
Retrieve the HashMap containing the titles of this publication in language other than the main site language. |
static Publication.TrackedSelector |
getTrackedSelector()
|
Collection<? extends TreeNode> |
getTreeChildren()
Returns a Collection of TreeNode children of the current node |
TreeNode |
getTreeParent()
Returns parent of the current node |
static Comparator |
getTypeComparator()
|
String |
getTypeLabel(String lang)
Returns the label of the type of this publication. |
Date |
getUdate()
Returns the date of last major update. |
static Comparator |
getUdateComparator()
|
static Publication.UdateSelector |
getUdateSelector(Date begin,
Date end)
|
Set<Group> |
getUpdateGroupSet()
Get the value of updateGroupSet. |
Set<Member> |
getUpdateMemberSet()
Get the value of updateMemberSet. |
String |
getVersionString()
Returns the current version (major.minor) of this publication. |
static Publication.VisibleStateSelector |
getVisibleStateSelector()
|
Set<Publication> |
getWeakReferrerSet()
Returns the set of weak referrers. |
List<WFNote> |
getWFNoteList()
Returns the list of WFNote bound to this publication. |
WFState |
getWFState()
Returns the WFState bound to the current pstatus or null if none |
String |
getWFStateLabel(String lang)
This convenient method returns the Workflow's state label this publication is in. |
Set<Publication> |
getWorkCopySet()
Get the value of workCopySet. |
Workflow |
getWorkflow()
Returns the Workflow bound to this publication |
Workspace |
getWorkspace()
|
static Publication.WorkspaceAuthorSelector |
getWorkspaceAuthorSelector(Workspace workspace,
Member author)
|
static Comparator |
getWorkspaceComparator(String lang)
|
String |
getWorkspaceId()
Returns the JStore ID of the workspace (only for DBData) |
static Publication.WorkspaceSelector |
getWorkspaceSelector(Workspace workspace)
|
WSTypeEntry |
getWSTypeEntry()
This method return a WSTypeEntry for the current workspace in the current class. |
WSTypeEntry |
getWSTypeEntry(Workspace wrkspc)
This method return a WSTypeEntry for the given workspace in the current class. |
boolean |
hasAlreadyVoted(Member member)
Check if the given member has already voted for this publication |
boolean |
hasAnyReadRights()
Tests if this publication has member or group read rights. |
boolean |
hasBeenReadBy(Member mbr)
Check if the given member has read this publication |
boolean |
hasCategory(Category cat)
Test if a publication references a given category. |
boolean |
hasImportConflict()
Returns true if this imported publication has a conflict copy. |
boolean |
hasNoReadRights()
Tests if this publication has NO member read rights AND NO group read rights. |
boolean |
hasReview()
Checks if this publication has at least one review. |
boolean |
hasWeakReferrers()
Returns true if this publication has weak referrers. |
void |
importConvertToLocal(Member opAuthor)
Converts this imported publication to a local data |
void |
importMarkAsMerged(Member opAuthor)
Merges all the import extra data (import date, import version, ....) of the most recent conflict copy with the original. |
void |
importOverrideAndUpdate(Member opAuthor)
Ignores all the local changes and replaces the local imported data with the conflict copy. |
void |
importXml(org.jdom.Element elt,
ImportOptions options)
Fill this data with the values contains in the JDOM element. |
void |
init(Member author,
Workspace ws)
This method initialise the object with default values for the given workspace: Default categories Default Authorized groups Default Pstatus Given Workspace Given Author and opAuthor It should be called after constructor and before setting parameters. |
void |
initCopy(Member newAuthor)
Initialize this publication once it has been cloned for a copy (eg by duplicate.jsp) |
boolean |
isAudienced()
Check if this publication is Audienced. |
boolean |
isDefaultTemplate(String usage)
Checks if the publication use a default template for the given usage |
boolean |
isImportConflictCopy()
Returns true if this publication is an import conflict copy. |
boolean |
isInRole(String roleId,
Member mbr)
Determines whether the given member can use the given role for this publication |
boolean |
isInVisibleState()
Returns true if this publication is in a visible state |
boolean |
isPublic()
Returns true is this publication can be read by any one. |
boolean |
isRoleAssigned(String roleId)
Determines whether there exists at least one member assigned to the given role |
boolean |
isTracked()
Check if a the publication's readers are tracked |
boolean |
isTreeLeaf()
Returns boolean true if the TreeNode is a leaf |
boolean |
isTreeNode()
Returns boolean true if the TreeNode is a node |
boolean |
isUserContent()
Returns true if this data is User Content. |
static boolean |
isUserContentType(Class<?> clazz)
Checks if the given class is a "User Content" That means a Publication not manage by JCMS workers. |
boolean |
isWorkCopy()
Return true if this publication have a main instance |
void |
majorUpdate()
Increments the major version (not saved in the store). |
void |
performCreate(Member mbr,
Map context)
Performs data creation |
void |
performDelete(Member mbr,
Map context)
Performs data deletion |
void |
performMerge(Member mbr)
Performs publication merge |
void |
performMerge(Member mbr,
Map context)
Performs publication merge |
void |
performUpdate(Member mbr,
Map context)
Performs data update |
protected Publication |
prepareMergeCopy()
|
void |
putPstatusAlarmEntry(int pstatus,
AlarmEntry alarmEntry)
Bind an AlarmEntry to a given pstatus |
void |
removeAllDescendants(Member opAuthor,
Map context)
Remove all descendant TreeNode that can be deleted |
void |
removeAllReaderTracker(Member opAuthor)
Remove all the readers notes |
boolean |
removeAuthorizedGroup(Group grp)
Remove an authorized group. |
boolean |
removeAuthorizedMember(Member mbr)
Remove an authorized member. |
void |
removeCategory(Category cat)
Remove the specified category from this publication's categories |
protected void |
removeDataSet(Member opAuthor,
Set<? extends Data> dataSet)
Remove all the data of the given data set |
void |
removeImportMetadata()
Remove all the import metadata on this publication |
AlarmEntry |
removePstatusAlarmEntry(int pstatus)
Remove an AlarmEntry to a given pstatus |
void |
removeWeakReferrer(Publication referrer)
Remove a weak referrer. |
void |
removeWFExpressAlarm()
Removes the WFExpress alarm for this publication. |
void |
removeWFReminderAlarm()
Removes the WFExpress alarm for this publication. |
protected static TypeTemplateEntry |
resolveTypeTemplateEntry(WSTypeEntry wste,
String usage,
String[] templates)
Returns TypeTemplateEntry matching given parameters. |
void |
setAdate(Date v)
Set the archiving date of this publication. |
void |
setAuthorizedGroupSet(TreeSet<Group> groupSet)
Set the set of Group authorized to read this Publication. |
void |
setAuthorizedMemberSet(TreeSet<Member> memberSet)
Set the set of Member authorized to read this Publication. |
void |
setCategories(Category[] cats)
Set categories of this publication. |
void |
setCategorySet(Set<Category> catSet)
Replaces the current categories with this set of categories. |
void |
setCdate(Date cdate)
Set the cdate and update the udate |
void |
setEdate(Date v)
Set the expiration date of this publication. |
void |
setFriendlyURLSet(TreeSet<String> v)
Set the value of friendlyURLSet. |
void |
setImportConflictCopy(boolean v)
Set the value of isImportConflictCopy. |
void |
setImportVersion(String v)
Set the value of importVersion. |
void |
setMainInstance(Publication mainInstance)
If this publication is a work copy then set it's main instance |
void |
setMainLanguage(String v)
Set the value of main language. |
void |
setMajorVersion(int majorVersion)
Set the major version. |
void |
setMergeDate(Date mergeDate)
Set the date of the last merge with a work copy |
void |
setMergeId(String mergeId)
Set the id of the work copy used for the last merge. |
void |
setPdate(Date v)
Set the publication date of this publication. |
void |
setPstatus(int v)
Set the value of pstatus. |
void |
setRoleMap(HashMap<String,Member> roleMap)
|
void |
setSdate(Date v)
Set the sort date of this publication. |
void |
setTemplate(String name)
|
void |
setTemplates(String[] v)
Set the value of templates. |
void |
setTitle(String v)
Set the title of this publication in the main site language. |
void |
setTitle(String lang,
String value)
Convenient method to set the value of the Title field in any language (default site language or any other). |
void |
setTitleML(HashMap<String,String> v)
Set the HashMap containing the titles of this publication in language other than the main site language. |
void |
setTracked(boolean bool)
Set the track flag |
void |
setUdate(Date udate)
Set the date of last major update. |
void |
setUpdateGroupSet(TreeSet<Group> v)
Set the value of updateGroupSet. |
void |
setUpdateMemberSet(TreeSet<Member> v)
Set the value of updateMemberSet. |
void |
setWorkspace(Workspace workspace)
|
void |
setWorkspaceId(String v)
Sets the JStore ID of the workspace (only for DBData) |
String |
toCSV(String lang)
Returns a CSV view of this object |
String |
toFullString()
|
String |
toString()
|
void |
trackReader(Member mbr)
Track the given reader. |
void |
unassignMember(Member mbr)
Unassign a member from all the role he has been assigned to. |
void |
unassignRole(String roleId)
Unassigns a member to a role |
void |
updatePstatus(Member author,
int newPstatus,
String note)
Change the pstatus of this publication, store it and generate a WFNote |
protected String[] |
updateTemplate(String name,
String[] templates)
|
Methods inherited from class com.jalios.jstore.BasicStorable |
---|
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getDdate, getId, getMdate, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setDdate, setId, setStore, toXml |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final int CTRL_TOPIC_CATEGORIES
public static final int CTRL_TOPIC_WORKFLOW
public static final int CTRL_TOPIC_ADVANCED
protected static PublicationIndexManager indexMgr
protected String mainLanguage
protected String title
protected HashMap<String,String> titleML
protected Date pdate
protected Date edate
protected Date sdate
protected Date adate
protected Date udate
protected int majorVersion
protected transient int minorVersion
protected int pstatus
protected Date mergeDate
protected String mergeId
protected Category[] categories
protected String[] templates
protected TreeSet<Member> authorizedMemberSet
protected TreeSet<Group> authorizedGroupSet
protected TreeSet<Member> updateMemberSet
protected TreeSet<Group> updateGroupSet
protected Publication mainInstance
protected boolean isTracked
protected TreeSet<String> friendlyURLSet
protected Workspace workspace
protected HashMap<String,Member> roleMap
protected transient TreeSet<Category> categorySet
protected transient AlarmEntry wfExpressAlarmEntry
protected transient AlarmEntry wfReminderAlarmEntry
Constructor Detail |
---|
public Publication()
public Publication(Publication other)
Method Detail |
---|
public void init(Member author, Workspace ws)
This method initialise the object with default values for the given workspace:
It should be called after constructor and before setting parameters. Handlers already set theses parameters. This is a convenient method for external developpements.
author
- the Author of the publicationws
- the workspace of the publicationpublic String getAllWikiText()
public String getAllWysiwygText()
public String[] getSearchStrings()
getSearchStrings
in interface Searchable
Searchable.getSearchStrings()
public boolean hasCategory(Category cat)
cat
- the category to be tested
public String toString()
toString
in class Data
public void importXml(org.jdom.Element elt, ImportOptions options)
Data
importXml
in class Data
elt
- the JDOM elementoptions
- the ImportOptionspublic Publication getImportConflictCopy()
public boolean hasImportConflict()
public boolean isImportConflictCopy()
public void setImportConflictCopy(boolean v)
v
- Value to assign to isImportConflictCopy.public void importMarkAsMerged(Member opAuthor)
opAuthor
- the author of the operationpublic void importOverrideAndUpdate(Member opAuthor)
opAuthor
- the author of the operation.public void importConvertToLocal(Member opAuthor)
opAuthor
- the author of the operationpublic void removeImportMetadata()
public String computeSignature()
public void exportXmlField(StringBuffer sb, int indentLevel)
Data
exportXmlField
in class Data
sb
- the StringBufferindentLevel
- the indent levelpublic Set<FileDocument> getDocumentLinkSet()
public String getTypeLabel(String lang)
lang
- the language
public String getVersionString()
public void majorUpdate()
public String toFullString()
toFullString
in class Data
public String toCSV(String lang)
toCSV
in class Data
lang
- the output language
public static String getCSVHeader(String lang)
lang
- the output language
public String getAbstract()
public String getAbstract(String lang, boolean useDefault)
lang
- the user language (ISO-639 language code)useDefault
- should the default language be used
public String getAbstract(String lang)
lang
- the user language
public HashMap<String,String> getAbstractML()
public int getGlobalRating()
public void clearTransientIndex()
public void initCopy(Member newAuthor)
newAuthor
- the author of this publicationpublic Publication createCopy(Member mbr)
mbr
- the author of the copy
public Publication createWorkCopy(Member mbr)
mbr
- the author of the work copy
public TreeSet<Category> getDescendantCategorySet(Category parent)
parent
- the parent category
public TreeSet<Category> getDescendantCategorySet(Category parent, boolean includingParent)
includingParent
is true.
The set is ordered according the Category.OrderComparator. This methods only
returns public categories (ie without read rights).
parent
- the parent categoryincludingParent
- true if the parent has to be included in the set of tested categories
public TreeSet<Category> getDescendantCategorySet(Category parent, boolean includingParent, Member member)
includingParent
is true. Check category read rights
for the given member. The set is ordered according the
Category.OrderComparator using current userLang (see Channel.getCurrentUserLang()
.
parent
- the parent categoryincludingParent
- true if the parent has to be included in the set of tested categoriesmember
- if not null, checks if the category read rights for this member
public Category getFirstDescendantCategory(Category parent)
parent
- the parent category
public Category getFirstDescendantCategory(Category parent, boolean includingParent)
includingParent
is true and the
current publication has parent
as category. This
methods returns a public category (ie without read rights).
parent
- the parent categoryincludingParent
- true if the category membership test must be made on parent too
public Category getFirstDescendantCategory(Category parent, boolean includingParent, Member member)
includingParent
is true and the current publication has parent
as category. Check category read rights for the given member.
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
public boolean containsCategory(Category category)
category
- the category
public boolean hasWeakReferrers()
public Set<Publication> getWeakReferrerSet()
public void addWeakReferrer(Publication referrer)
referrer
- the weak referrer to be added.public void removeWeakReferrer(Publication referrer)
referrer
- the weak referrer to be removed.public Set<String> getExternalLinkSet()
public final boolean canBeReadBy(Member member, boolean searchInGroups)
member
- the member to checksearchInGroups
- if true check if one of the group this
member belongs to is authorized to read this publication.
public boolean isUserContent()
public static boolean isUserContentType(Class<?> clazz)
clazz
- the working class
public boolean canBeReadBy(Member member)
member
- the member to check
canBeReadBy(com.jalios.jcms.Member,boolean)
public boolean canBeReadBy(Group group)
group
- the group to check
public boolean isAudienced()
RightPolicy.isAudienced(Publication)
.
RightPolicy.isAudienced(Publication)
public String getAudiencedRightsString(String userLang, int max)
userLang
- the user languagemax
- how many group/member to display
public boolean hasAnyReadRights()
!hasSomeReadRights()
to test
if this publication has no read rights, in this case, use the method
hasNoReadRights()
.
public boolean hasNoReadRights()
!hasNoReadRights()
to test
if this publication has some read rights, in this case, use the method
hasAnyReadRights()
.
public String getReadRightsString(int max)
max
- how many group/member to display
public boolean isPublic()
public Publication getMainInstance()
public void setMainInstance(Publication mainInstance)
mainInstance
- the main instancepublic boolean isWorkCopy()
public boolean isInVisibleState()
Channel.isVisiblePstatus(int)
public ControllerStatus canBeArchived(Member mbr, Map context)
mbr
- the member to checkcontext
- the
CustomArchiveManager.canBeArchived(com.jalios.jcms.Publication, com.jalios.jcms.Member, Map)
public boolean canBeArchived(Member mbr)
mbr
-
canBeArchived(Member, Map)
public boolean canCreateCopy(Member mbr)
mbr
- the member to be checked
public boolean canCreateCopy(Member mbr, boolean isWorkCopy)
mbr
- the member to be checkedisWorkCopy
- true if this is a workCopy
public boolean canCreateWorkCopy(Member mbr)
mbr
- the member to be checked
public boolean canMergeWorkCopy(Member mbr)
mbr
- the member to be checked
public boolean canBeEditedFieldByField(Member mbr)
mbr
- the member to check
public Workflow getWorkflow()
public WFState getWFState()
public String getWFStateLabel(String lang)
lang
- the language used for localisation.
getWFState()
public Set<WFState> getNextWFStateSet(Member member)
member
- the member.
public AlarmEntry getPstatusAlarmEntry(int pstatus)
pstatus
- the pstatus
public void putPstatusAlarmEntry(int pstatus, AlarmEntry alarmEntry)
pstatus
- the pstatusalarmEntry
- the AlarmEntrypublic AlarmEntry removePstatusAlarmEntry(int pstatus)
pstatus
- the pstatus
public TreeSet getLinkDataSet(Class clazz)
clazz
- the class of Data
public boolean checkLang(String lang)
lang
- the language to check (lower-case two-letter codes as
defined by ISO-639 (eg: en, fr, de, es, ...)
public Category[] getCategories(Member member)
member
- the member to be checked
public TreeSet<Category> getCategorySet()
Do not modify the returned value !! This method returns an
internal index which is not stored. If you need to modify
the categories of this publication, see methods
setCategories(Category[])
, addCategory(Category)
or removeCategory(Category)
.
This methods always returns a set with the exact same categories
available through getCategories()
.
public void setCategorySet(Set<Category> catSet)
catSet
- the new category setpublic void addCategory(Category cat)
cat
- the category to be addedpublic void removeCategory(Category cat)
cat
- the category to be removedpublic void updatePstatus(Member author, int newPstatus, String note)
author
- the author of this update (ie the author of the WFNote)newPstatus
- new value of pstatusnote
- the WFNote's commentpublic WSTypeEntry getWSTypeEntry(Workspace wrkspc)
wrkspc
- The working Workspace
Workspace.getWSTypeEntry(Class)
public WSTypeEntry getWSTypeEntry()
getWSTypeEntry(Workspace)
@Deprecated public String getDisplayTemplateFile()
@Deprecated public String getQueryTemplateFile()
public String getDefaultTemplateUsage()
public boolean isDefaultTemplate(String usage)
usage
- the template usage
public String getTemplate(String usage)
usage
- the template usage
public String getTemplatePath(JcmsJspContext ctxt)
ctxt
- the JcmsJspContext
public String getTemplatePath(String usage, boolean devModeChecks)
usage
- the template usagedevModeChecks
- perform developpement checks on template
public TypeTemplateEntry getTemplateEntry(String usage, boolean devModeChecks)
usage
- the template usagedevModeChecks
- perform developpement checks on template
checkTemplateEntry(TypeTemplateEntry, String, boolean, String)
public static TypeTemplateEntry getTemplateEntry(String usage, boolean devModeChecks, Class<? extends Data> clazz, Workspace ws)
usage
- the template usagedevModeChecks
- perform developpement checks on templateclazz
- the template publication classws
- the workspace where to create the publication
checkTemplateEntry(TypeTemplateEntry, String, boolean, String)
protected static TypeTemplateEntry resolveTypeTemplateEntry(WSTypeEntry wste, String usage, String[] templates)
wste
- the Type Descriptionusage
- the template usagetemplates
- null or available tempaltes
TypeEntry.getFirstTemplateEntry(String, String[])
protected static boolean checkTemplateEntry(TypeTemplateEntry tte, String usage, boolean devModeChecks, String label)
tte
- the TypeTemplateEntry to checkdevModeChecks
- perform developpement checks on templatelabel
- String use for error message
public Set<TypeTemplateEntry> getTemplateEntrySet()
public String[] getTemplates()
public void setTemplates(String[] v)
v
- Value to assign to templates.public void setTemplate(String name)
protected String[] updateTemplate(String name, String[] templates)
public Object getFieldInMainLanguage(Object field, HashMap fieldML)
public String getMainLanguage()
public void setMainLanguage(String v)
v
- Value to assign to main language.public String getDataName(String language)
Data
getDataName
in class Data
language
- the language in which to return the name if multilang available for the data.
getTitle(String)
,
Data.getDataName(String)
public String getTitle(String lang)
lang
- the language to get the title
public String getTitle(String lang, boolean useDefault)
lang
- the language to get the titleuseDefault
- should main language used as default language
if title does not exist in the given language
public String getTitle()
public void setTitle(String v)
v
- value to assign to title.public HashMap<String,String> getTitleML()
public void setTitleML(HashMap<String,String> v)
v
- an HashMap of String.public void setTitle(String lang, String value)
setTitle(String)
or setTitleML(HashMap)
)
depending on the specified language.
lang
- the language (ISO 639 code) in which to set the valuevalue
- the value to set.public Date getPdate()
public void setPdate(Date v)
v
- the Date to assign, can be null.public Date getEdate()
public void setEdate(Date v)
v
- the Date to assign, can be null.public Date getSdate()
public void setSdate(Date v)
v
- the Date to assign, can be null.public Date getAdate()
public void setAdate(Date v)
v
- the Date to assign, can be null.public void setUdate(Date udate)
udate
- the datepublic Date getUdate()
public int getPstatus()
public void setPstatus(int v)
v
- Value to assign to pstatus.public int getMajorVersion()
public void setMajorVersion(int majorVersion)
majorVersion
- the major versionpublic int getMinorVersion()
public void setCdate(Date cdate)
setCdate
in interface Storable
setCdate
in class BasicStorable
cdate
- Value to assign to cdate.BasicStorable.setCdate(java.util.Date)
public void setMergeDate(Date mergeDate)
mergeDate
- the merge date.public Date getMergeDate()
public void setMergeId(String mergeId)
mergeId
- public String getMergeId()
public Category[] getCategories()
public void setCategories(Category[] cats)
cats
- an array of Category (can be null or empty).public List<AbstractReview> getReviewList()
public List<AbstractReview> getReviewList(Member mbr)
mbr
- the member
public AbstractReview getReview(Member author)
author
- the author of the Review
public int getReviewCount()
public boolean hasReview()
public Set<Publication> getWorkCopySet()
public Set<Member> getAuthorizedMemberSet()
public void setAuthorizedMemberSet(TreeSet<Member> memberSet)
memberSet
- a set of Member.public void addAuthorizedMember(Member mbr)
mbr
- the member to be added.public boolean removeAuthorizedMember(Member mbr)
mbr
- the member to be removed.
public Set<Group> getAuthorizedGroupSet()
public void setAuthorizedGroupSet(TreeSet<Group> groupSet)
groupSet
- a set of Group.public void addAuthorizedGroup(Group grp)
grp
- the group to be added.public boolean removeAuthorizedGroup(Group grp)
grp
- the group to be removed.
public Set<Member> getUpdateMemberSet()
public void setUpdateMemberSet(TreeSet<Member> v)
v
- Value to assign to updateMemberSet.public Set<Group> getUpdateGroupSet()
public void setUpdateGroupSet(TreeSet<Group> v)
v
- Value to assign to updateGroupSet.public boolean isTracked()
public void setTracked(boolean bool)
bool
- a booleanpublic Workspace getWorkspace()
public void setWorkspace(Workspace workspace)
workspace
- The workspace to set.public HashMap<String,Member> getRoleMap()
public void setRoleMap(HashMap<String,Member> roleMap)
roleMap
- The roleMap to setpublic void assignRole(String roleId, Member mbr)
roleId
- the identifier of the WF role (e.g. "validators")mbr
- the member to be assigned to the rolepublic void unassignRole(String roleId)
roleId
- the identifier of the WF role (e.g. "validators")public void unassignMember(Member mbr)
mbr
- the member to be unassigned.public boolean isRoleAssigned(String roleId)
roleId
- the WFRole ID to be checked
public Member getMemberAssignedToRole(String roleId)
roleId
- the WFRole ID to be checked
public boolean isInRole(String roleId, Member mbr)
roleId
- the WFRole IDmbr
- the member to be checked
public TreeSet<String> getFriendlyURLSet()
public void setFriendlyURLSet(TreeSet<String> v)
v
- Value to assign to friendlyURLSet.public boolean hasBeenReadBy(Member mbr)
mbr
- The member you want to test
public List<ReaderTracker> getReaderTrackerList()
public int getReaderCount()
public int getAccessCount()
public void trackReader(Member mbr)
mbr
- the user to be tracked (may be null).public void removeAllReaderTracker(Member opAuthor)
opAuthor
- the member who performs this operationprotected void removeDataSet(Member opAuthor, Set<? extends Data> dataSet)
opAuthor
- the member who performs this operationdataSet
- the data set to be removedpublic void removeAllDescendants(Member opAuthor, Map context)
opAuthor
- the member who performs this operationcontext
- the DataController's contextpublic boolean hasAlreadyVoted(Member member)
member
- the member to check
public void addWFExpressAlarm()
public void removeWFExpressAlarm()
public void addWFReminderAlarm()
public void removeWFReminderAlarm()
public int getEstimatedReminderCount()
public Object[] checkStateChange(Member mbr, int pstatus)
mbr
- the member who submit the state changepstatus
- the new state
public boolean createWFNote(Member mbr, int pstatus, String note)
mbr
- the member which performe this operationpstatus
- new pstatusnote
- member's comment
public static Comparator getTitleComparator()
Publication.TitleComparator
.public static Comparator getTitleComparator(String lang)
lang
- the user language
Publication.TitleComparator
using the given language.public static Comparator getRatingComparator()
Publication.RatingComparator
.public static Comparator getReviewCountComparator()
Publication.ReviewCountComparator
.public static Comparator getPdateComparator()
Publication.PdateComparator
.public static Comparator getEdateComparator()
Publication.EdateComparator
.public static Comparator getSdateComparator()
Publication.SdateComparator
.public static Comparator getAdateComparator()
Publication.AdateComparator
.public static Comparator getUdateComparator()
Publication.UdateComparator
.public static Comparator getDdateComparator()
Publication.DdateComparator
.public static Comparator getWorkspaceComparator(String lang)
lang
- the user language
Publication.WorkspaceComparator
.public static Comparator getPstatusComparator()
Publication.PstatusComparator
.public static Comparator getRightComparator()
Publication.RightComparator
.public static Comparator getAudienceRightComparator()
Publication.AudienceRightComparator
.public static Comparator getTypeComparator()
Publication.TypeComparator
.public static Comparator getReaderComparator()
Publication.ReaderComparator
.public static Comparator getComparator(String str, boolean reverse)
Comparator
given a name representing
it. The returned comparator can be used to sort any
Collection
containing Publication
s.
getTitleComparator()
getRatingComparator()
getWorkspaceComparator(String)
getReviewCountComparator()
getPstatusComparator()
getRightComparator()
getAudienceRightComparator()
getTypeComparator()
getPdateComparator()
getEdateComparator()
getSdateComparator()
getAdateComparator()
getUdateComparator()
getDdateComparator()
getReaderComparator()
Data.getComparator(String, boolean)
str
- a string representing the comparatorreverse
- a boolean indicating whether the comparator should have
its behavior reversed (true) or unchanged (false)
Comparator
.Data.getComparator(String, boolean)
public static Comparator getComparator(String str, boolean reverse, QueryResultSet queryResultSet)
Comparator
given a name representing
it. The returned comparator can be used to sort any
Collection
containing Publication
s.
getComparator(String, boolean)
QueryResultSet.getScoreComparator(QueryResultSet, Comparator)
with the givenqueryResultSet and Data.getMdateComparator()
Comparator
to use when returning
a SortedSet
.getComparator(String, boolean)
,
Data.getComparator(String, boolean)
public Date getDate(String dateType)
getDate
in class Data
dateType
- the date type
public Date getDate(String dateType, Date defaultDate)
getDate
in class Data
dateType
- the date typedefaultDate
- the default date
public Date getIndexingDate()
public static Publication.AuthorizedSelector getAuthorizedSelector(Member member)
Publication.AuthorizedSelector
using
the given Member
.public static Publication.CanWorkOnSelector getCanWorkOnSelector(Member member)
Publication.CanWorkOnSelector
using
the given Member
.public static Publication.WorkspaceSelector getWorkspaceSelector(Workspace workspace)
Publication.WorkspaceAuthorSelector
using
the given Workspace
.public static Publication.WorkspaceAuthorSelector getWorkspaceAuthorSelector(Workspace workspace, Member author)
Publication.WorkspaceAuthorSelector
using
the given Workspace
and Member
.public static Publication.VisibleStateSelector getVisibleStateSelector()
Publication.VisibleStateSelector
.public static Publication.PstatusSelector getPstatusSelector(int pstatus)
Publication.PstatusSelector
.Publication.PstatusSelector
public static Publication.PstatusSelector getPstatusSelector(int pstatus, int greater)
Publication.PstatusSelector
.Publication.PstatusSelector
public static Publication.PdateSelector getPdateSelector(Date begin, Date end)
Publication.PdateSelector
using the given
begin and end Date
.public static Publication.SdateSelector getSdateSelector(Date begin, Date end)
Publication.SdateSelector
using the given
begin and end Date
.public static Publication.EdateSelector getEdateSelector(Date begin, Date end)
Publication.EdateSelector
using the given
begin and end Date
.public static Publication.AdateSelector getAdateSelector(Date begin, Date end)
Publication.AdateSelector
using the given
begin and end Date
.public static Publication.UdateSelector getUdateSelector(Date begin, Date end)
Publication.UdateSelector
using the given
begin and end Date
.public static DataSelector getDateSelector(String str, Date begin, Date end)
DataSelector
given a name representing
it. The returned selector can be passed to the method
JcmsUtil.applyDataSelector(java.util.Collection, DataSelector)
to
allow precise control over the selection of Data
in a
Collection
.
getPdateSelector(Date begin, Date end)
getSdateSelector(Date begin, Date end)
getEdateSelector(Date begin, Date end)
getAdateSelector(Date begin, Date end)
getUdateSelector(Date begin, Date end)
Data.getDateSelector(String, Date, Date)
str
- a string representing the selectorbegin
- the begin Date
to use for selectionend
- the end Date
to use for selection
Comparator
.Data.getDateSelector(String, Date, Date)
public static Publication.TrackedSelector getTrackedSelector()
Publication.TrackedSelector
.public static Publication.AudienceRightSelector getAudienceRightSelector()
Publication.AudienceRightSelector
.public static Publication.ReadRightSelector getReadRightSelector()
Publication.ReadRightSelector
.public Collection<? extends TreeNode> getTreeChildren()
TreeNode
getTreeChildren
in interface TreeNode
TreeNode.getTreeChildren()
public TreeNode getTreeParent()
TreeNode
getTreeParent
in interface TreeNode
TreeNode.getTreeParent()
public boolean isTreeLeaf()
TreeNode
isTreeLeaf
in interface TreeNode
TreeNode.isTreeLeaf()
public boolean isTreeNode()
TreeNode
isTreeNode
in interface TreeNode
TreeNode.isTreeNode()
public ControllerStatus checkIntegrity()
checkIntegrity
in class Data
public ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, Map context)
checkWrite
in class Data
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)
public ControllerStatus checkMember(int op, Member mbr, Map context)
checkMember
in class Data
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)
public ControllerStatus checkCreate(Member mbr, Map context)
checkCreate
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)
public ControllerStatus checkUpdate(Member mbr, Map context)
checkUpdate
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)
public ControllerStatus checkDelete(Member mbr, Map context)
checkDelete
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)
public ControllerStatus checkMerge(Member mbr, Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)
public void performCreate(Member mbr, Map context)
performCreate
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public void performUpdate(Member mbr, Map context)
performUpdate
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public void performDelete(Member mbr, Map context)
performDelete
in class Data
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)protected Publication prepareMergeCopy()
public void performMerge(Member mbr)
mbr
- the member which requests the write operationpublic void performMerge(Member mbr, Map context)
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public Object getFieldValue(String fieldName, String lang, boolean useDefault) throws NoSuchFieldException
Object
field name for the current Data
. Category
fields, see #getCategoryFieldValue(String, Member).
getFieldValue
in class Data
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).
Object
field value
NoSuchFieldException
- if the field was not found in the given Data
.public void assignCommonPublicationFields(Publication pub)
As of current implementation, the following fields are copied :
pub
- the publication to copy from.public String getImportVersion()
public void setImportVersion(String v)
v
- Value to assign to importVersion.public List<WFNote> getWFNoteList()
public String getWorkspaceId()
public void setWorkspaceId(String v)
v
- the JStore workspace id
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |