public class ArchivedPublication extends java.lang.Object implements java.lang.Comparable<ArchivedPublication>, DBData, JcmsConstants
Modifier and Type | Field and Description |
---|---|
protected Member |
author |
protected java.util.TreeSet<Group> |
authorizedGroupSet |
protected java.util.TreeSet<Member> |
authorizedMemberSet |
protected java.util.Date |
cdate |
protected java.lang.String |
description |
protected java.util.HashMap<java.lang.String,java.lang.String> |
descriptionML |
protected java.lang.String |
mainLanguage |
protected java.lang.String |
originalId |
protected short |
originalType |
protected java.lang.String |
originalTypeLabel |
static java.lang.String |
REVISION |
protected java.lang.Long |
rowId |
protected java.lang.String |
title |
protected java.util.HashMap<java.lang.String,java.lang.String> |
titleML |
static short |
TYPE_CONTENT |
static short |
TYPE_FORM |
protected Workspace |
workspace |
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_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, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, 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, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
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 and Description |
---|
ArchivedPublication() |
ArchivedPublication(Publication pub)
Create a new ArchivedPublication from a publication.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeDeletedBy(Member member)
Check if this archive can be deleted by specified member.
|
boolean |
canBeReadBy(Member member)
Check if this archive can be ready by specified member.
|
boolean |
canBeUpdatedBy(Member member)
Check if this archive can be updated by specified member.
|
int |
compareTo(ArchivedPublication other) |
void |
delete()
Delete this archive (from the DB and all associated files on disk).
|
java.util.HashMap<java.lang.String,java.lang.String> |
getAssociatedFilesMap()
Retrieve files associated with the given archive.
|
Member |
getAuthor()
Get the author of this Archive.
|
java.lang.String |
getAuthorId()
Returns the JStore ID of the author
|
java.lang.String |
getAuthorizedGroupIds() |
java.util.Set<Group> |
getAuthorizedGroupSet()
Get the set of Group authorized to read this archive.
|
java.lang.String |
getAuthorizedMemberIds() |
java.util.Set<Member> |
getAuthorizedMemberSet()
Get the set of Member authorized to read this archive.
|
java.util.Date |
getCdate()
Get the archive creation date.
|
java.lang.String |
getDescription() |
java.lang.String |
getDescription(java.lang.String lang) |
java.lang.String |
getDescription(java.lang.String lang,
boolean useDefault) |
java.util.HashMap<java.lang.String,java.lang.String> |
getDescriptionML() |
java.lang.String |
getDescriptionXml()
Retrieves an xml serialization of the descriptions of this Publication in all the languages.
|
java.lang.String |
getMainLanguage()
Get the value of main language.
|
java.lang.String |
getOriginalId() |
short |
getOriginalType() |
java.lang.String |
getOriginalTypeLabel() |
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.lang.Long |
getRowId() |
java.lang.String |
getSavedHtmlPath(java.lang.String userLang)
Return the path (webapp relative, for jsp inclusion) of the file in which
the original publication was saved
|
java.lang.String |
getSavedXmlPath()
Return the path (webapp relative) of the XML file in which the original
publication's data was saved
|
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.
|
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 |
getTitleXml()
Retrieves an xml serialization of the titles of this Publication in all the languages.
|
Workspace |
getWorkspace() |
java.lang.String |
getWorkspaceId() |
boolean |
hasAnyReadRights()
Tests if this archive has member or group read rights.
|
void |
save()
Creates or updates this archive in the DB.
|
void |
setAuthor(Member mbr)
Set the author of this Archive.
|
void |
setAuthorId(java.lang.String authordId)
Sets the JStore ID of the author
|
void |
setAuthorizedGroupIds(java.lang.String authorizedGroupIds) |
void |
setAuthorizedGroupSet(java.util.TreeSet<Group> groupSet)
Set the set of Group authorized to read this archive.
|
void |
setAuthorizedMemberIds(java.lang.String authorizedMemberIds) |
void |
setAuthorizedMemberSet(java.util.TreeSet<Member> memberSet)
Set the set of Member authorized to read this archive.
|
void |
setCdate(java.util.Date cdate)
Set the creation date of this ArchivedPublication.
|
void |
setDescription(java.lang.String value) |
void |
setDescriptionML(java.util.HashMap<java.lang.String,java.lang.String> map) |
void |
setDescriptionXml(java.lang.String xml)
Set the descriptions of this Publication in all the languages using the specified XML string.
|
void |
setMainLanguage(java.lang.String v)
Set the value of main language.
|
void |
setOriginalId(java.lang.String originalId) |
void |
setOriginalType(short originalType) |
void |
setOriginalTypeLabel(java.lang.String originalTypeLabel) |
void |
setRowId(java.lang.Long rowId) |
void |
setTitle(java.lang.String v)
Set the title of this publication in the main site 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 |
setTitleXml(java.lang.String xml)
Set the titles of this Publication in all the languages using the specified XML string.
|
void |
setWorkspace(Workspace workspace) |
void |
setWorkspaceId(java.lang.String workspaceId) |
public static final java.lang.String REVISION
public static final short TYPE_CONTENT
public static final short TYPE_FORM
protected java.lang.Long rowId
protected java.util.Date cdate
protected Workspace workspace
protected Member author
protected java.lang.String mainLanguage
protected java.lang.String title
protected java.util.HashMap<java.lang.String,java.lang.String> titleML
protected java.lang.String description
protected java.util.HashMap<java.lang.String,java.lang.String> descriptionML
protected java.lang.String originalId
protected short originalType
protected java.lang.String originalTypeLabel
protected java.util.TreeSet<Member> authorizedMemberSet
protected java.util.TreeSet<Group> authorizedGroupSet
public ArchivedPublication()
public ArchivedPublication(Publication pub)
Should only be called by the ArchiveManager which performs the whole archiving process.
pub
- the Publication from which we create this Archivepublic void save()
public void delete()
public boolean canBeReadBy(Member member)
member
- the member to check (can be null)public boolean canBeUpdatedBy(Member member)
member
- the member to check (can be null)public boolean canBeDeletedBy(Member member)
member
- the member to check (can be null)public java.lang.String getSavedHtmlPath(java.lang.String userLang)
userLang
- the lang in which the Publication is wanted, if availablepublic java.lang.String getSavedXmlPath()
public java.util.HashMap<java.lang.String,java.lang.String> getAssociatedFilesMap()
public java.util.Date getCdate()
public void setCdate(java.util.Date cdate)
cdate
- Value to assign to cdate.public Workspace getWorkspace()
public void setWorkspace(Workspace workspace)
public java.lang.String getWorkspaceId()
public void setWorkspaceId(java.lang.String workspaceId)
public Member getAuthor()
public void setAuthor(Member mbr)
mbr
- Value to assign to author.public java.lang.String getAuthorId()
public void setAuthorId(java.lang.String authordId)
authordId
- the JStore author idpublic java.lang.String getMainLanguage()
public void setMainLanguage(java.lang.String v)
v
- Value to assign to main language.public java.lang.String getTitle(java.lang.String lang)
lang
- the language to get the titlepublic java.lang.String getTitle(java.lang.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 languagepublic java.lang.String getTitle()
public void setTitle(java.lang.String v)
v
- value to assign to title.public java.util.HashMap<java.lang.String,java.lang.String> getTitleML()
public void setTitleML(java.util.HashMap<java.lang.String,java.lang.String> v)
v
- an HashMap of String.public java.lang.String getTitleXml()
JcmsUtil.convertMultilingualFieldToXml(String, Map)
public void setTitleXml(java.lang.String xml)
xml
- an xml string as returned by getTitleXml()
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getDescription(java.lang.String lang)
public java.lang.String getDescription(java.lang.String lang, boolean useDefault)
public java.util.HashMap<java.lang.String,java.lang.String> getDescriptionML()
public void setDescriptionML(java.util.HashMap<java.lang.String,java.lang.String> map)
public java.lang.String getDescriptionXml()
JcmsUtil.convertMultilingualFieldToXml(String, Map)
public void setDescriptionXml(java.lang.String xml)
xml
- an xml string as returned by getDescriptionXml()
public java.util.Set<Member> getAuthorizedMemberSet()
public void setAuthorizedMemberSet(java.util.TreeSet<Member> memberSet)
memberSet
- a set of Member.public java.lang.String getAuthorizedMemberIds()
public void setAuthorizedMemberIds(java.lang.String authorizedMemberIds)
public java.util.Set<Group> getAuthorizedGroupSet()
public void setAuthorizedGroupSet(java.util.TreeSet<Group> groupSet)
groupSet
- a set of Group.public java.lang.String getAuthorizedGroupIds()
public void setAuthorizedGroupIds(java.lang.String authorizedGroupIds)
public boolean hasAnyReadRights()
public java.lang.String getReadRightsString(int max)
max
- how many group/member to displaypublic java.lang.String getOriginalId()
public void setOriginalId(java.lang.String originalId)
public short getOriginalType()
public void setOriginalType(short originalType)
public java.lang.String getOriginalTypeLabel()
public void setOriginalTypeLabel(java.lang.String originalTypeLabel)
public int compareTo(ArchivedPublication other)
compareTo
in interface java.lang.Comparable<ArchivedPublication>
Copyright © 2001-2010 Jalios SA. All Rights Reserved.