| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.archive.ArchivedPublication
public class ArchivedPublication
This class represents an archived Publication in memory, used to keep track of authors, rights, category, workspace of archived publication
| Field Summary | |
|---|---|
protected  Member | 
author
 | 
protected  TreeSet<Group> | 
authorizedGroupSet
 | 
protected  TreeSet<Member> | 
authorizedMemberSet
 | 
protected  Date | 
cdate
 | 
protected  String | 
description
 | 
protected  HashMap<String,String> | 
descriptionML
 | 
protected  String | 
mainLanguage
 | 
protected  String | 
originalId
 | 
protected  short | 
originalType
 | 
protected  String | 
originalTypeLabel
 | 
static String | 
REVISION
 | 
protected  Long | 
rowId
 | 
protected  String | 
title
 | 
protected  HashMap<String,String> | 
titleML
 | 
static short | 
TYPE_CONTENT
 | 
static short | 
TYPE_FORM
 | 
protected  Workspace | 
workspace
 | 
| 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 | |
|---|---|
ArchivedPublication()
 | 
|
ArchivedPublication(Publication pub)
Create a new ArchivedPublication from a publication.  | 
|
| Method Summary | |
|---|---|
 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.  | 
 void | 
delete()
Delete this archive (from the DB and all associated files on disk).  | 
 HashMap<String,String> | 
getAssociatedFilesMap()
Retrieve files associated with the given archive.  | 
 Member | 
getAuthor()
Get the author of this Archive.  | 
 String | 
getAuthorId()
Returns the JStore ID of the author  | 
 String | 
getAuthorizedGroupIds()
 | 
 Set<Group> | 
getAuthorizedGroupSet()
Get the set of Group authorized to read this archive.  | 
 String | 
getAuthorizedMemberIds()
 | 
 Set<Member> | 
getAuthorizedMemberSet()
Get the set of Member authorized to read this archive.  | 
 Date | 
getCdate()
Get the archive creation date.  | 
 String | 
getDescription()
 | 
 String | 
getDescription(String lang)
 | 
 String | 
getDescription(String lang,
               boolean useDefault)
 | 
 HashMap<String,String> | 
getDescriptionML()
 | 
 String | 
getDescriptionXml()
Retrieves an xml serialization of the descriptions of this Publication in all the languages.  | 
 String | 
getMainLanguage()
Get the value of main language.  | 
 String | 
getOriginalId()
 | 
 short | 
getOriginalType()
 | 
 String | 
getOriginalTypeLabel()
 | 
 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, ...")  | 
 Long | 
getRowId()
 | 
 String | 
getSavedHtmlPath(String userLang)
Return the path (webapp relative, for jsp inclusion) of the file in which the original publication was saved  | 
 String | 
getSavedXmlPath()
Return the path (webapp relative) of the XML file in which the original publication's data was saved  | 
 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.  | 
 HashMap<String,String> | 
getTitleML()
Retrieve the HashMap containing the titles of this publication in language other than the main site language.  | 
 String | 
getTitleXml()
Retrieves an xml serialization of the titles of this Publication in all the languages.  | 
 Workspace | 
getWorkspace()
 | 
 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(String authordId)
Sets the JStore ID of the author  | 
 void | 
setAuthorizedGroupIds(String authorizedGroupIds)
 | 
 void | 
setAuthorizedGroupSet(TreeSet<Group> groupSet)
Set the set of Group authorized to read this archive.  | 
 void | 
setAuthorizedMemberIds(String authorizedMemberIds)
 | 
 void | 
setAuthorizedMemberSet(TreeSet<Member> memberSet)
Set the set of Member authorized to read this archive.  | 
 void | 
setCdate(Date cdate)
Set the creation date of this ArchivedPublication.  | 
 void | 
setDescription(String value)
 | 
 void | 
setDescriptionML(HashMap<String,String> map)
 | 
 void | 
setDescriptionXml(String xml)
Set the descriptions of this Publication in all the languages using the specified XML string.  | 
 void | 
setMainLanguage(String v)
Set the value of main language.  | 
 void | 
setOriginalId(String originalId)
 | 
 void | 
setOriginalType(short originalType)
 | 
 void | 
setOriginalTypeLabel(String originalTypeLabel)
 | 
 void | 
setRowId(Long rowId)
 | 
 void | 
setTitle(String v)
Set the title of this publication in the main site language.  | 
 void | 
setTitleML(HashMap<String,String> v)
Set the HashMap containing the titles of this publication in language other than the main site language.  | 
 void | 
setTitleXml(String xml)
Set the titles of this Publication in all the languages using the specified XML string.  | 
 void | 
setWorkspace(Workspace workspace)
 | 
 void | 
setWorkspaceId(String workspaceId)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String REVISION
public static final short TYPE_CONTENT
public static final short TYPE_FORM
protected Long rowId
protected Date cdate
protected Workspace workspace
protected Member author
protected String mainLanguage
protected String title
protected HashMap<String,String> titleML
protected String description
protected HashMap<String,String> descriptionML
protected String originalId
protected short originalType
protected String originalTypeLabel
protected TreeSet<Member> authorizedMemberSet
protected TreeSet<Group> authorizedGroupSet
| Constructor Detail | 
|---|
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 Archive| Method Detail | 
|---|
public 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 String getSavedHtmlPath(String userLang)
userLang - the lang in which the Publication is wanted, if available
public String getSavedXmlPath()
public HashMap<String,String> getAssociatedFilesMap()
public void setRowId(Long rowId)
setRowId in interface DBDatapublic Long getRowId()
getRowId in interface DBDatapublic Date getCdate()
public void setCdate(Date cdate)
cdate - Value to assign to cdate.public Workspace getWorkspace()
public void setWorkspace(Workspace workspace)
public String getWorkspaceId()
public void setWorkspaceId(String workspaceId)
public Member getAuthor()
public void setAuthor(Member mbr)
mbr - Value to assign to author.public String getAuthorId()
public void setAuthorId(String authordId)
authordId - the JStore author idpublic String getMainLanguage()
public void setMainLanguage(String v)
v - Value to assign to main language.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 String getTitleXml()
JcmsUtil.convertMultilingualFieldToXml(String, Map)public void setTitleXml(String xml)
xml - an xml string as returned by getTitleXml()public String getDescription()
public void setDescription(String value)
public String getDescription(String lang)
public String getDescription(String lang,
                             boolean useDefault)
public HashMap<String,String> getDescriptionML()
public void setDescriptionML(HashMap<String,String> map)
public String getDescriptionXml()
JcmsUtil.convertMultilingualFieldToXml(String, Map)public void setDescriptionXml(String xml)
xml - an xml string as returned by getDescriptionXml()public Set<Member> getAuthorizedMemberSet()
public void setAuthorizedMemberSet(TreeSet<Member> memberSet)
memberSet - a set of Member.public String getAuthorizedMemberIds()
public void setAuthorizedMemberIds(String authorizedMemberIds)
public Set<Group> getAuthorizedGroupSet()
public void setAuthorizedGroupSet(TreeSet<Group> groupSet)
groupSet - a set of Group.public String getAuthorizedGroupIds()
public void setAuthorizedGroupIds(String authorizedGroupIds)
public boolean hasAnyReadRights()
public String getReadRightsString(int max)
max - how many group/member to display
public String getOriginalId()
public void setOriginalId(String originalId)
public short getOriginalType()
public void setOriginalType(short originalType)
public String getOriginalTypeLabel()
public void setOriginalTypeLabel(String originalTypeLabel)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||