Class Workspace
- java.lang.Object
-
- com.jalios.jstore.BasicStorable
-
- com.jalios.jcms.Data
-
- com.jalios.jcms.workspace.Workspace
-
- All Implemented Interfaces:
EditableData
,JcmsConstants
,ImportConstants
,MashupConstants
,Storable
,JaliosConstants
,LangPropertyArgument
,TreeNode
,java.lang.Cloneable
,java.lang.Comparable<BasicStorable>
public class Workspace extends Data implements EditableData, TreeNode
This class represents a Workspace- Since:
- jcms-4.1
- Author:
- Jean-Philippe Encausse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Workspace.CanWorkOnModelWorkspaceSelector
Select model workspaces the user can work on.static class
Workspace.ClassificationLevelComparator<T extends Workspace>
Compare workspace with their classification level.static class
Workspace.ClassificationLevelSelector
Select workspace with the specified classification level.static class
Workspace.CollaborativeSpaceSelector
Select workspace that are Collaborative Spaces.static class
Workspace.FavoriteComparator<T extends Workspace>
Compares workspaces based on member engagement.static class
Workspace.GroupSizeComparator<T extends Workspace>
static class
Workspace.HasPortalWorkspaceSelector
Select workspace with a Portal.static class
Workspace.MemberSizeComparator<T extends Workspace>
static class
Workspace.ModelWorkspaceSelector
Select model workspaces.static class
Workspace.NameComparator<T extends Workspace>
static class
Workspace.OpenWorkspaceSelector
Select open workspaces.static class
Workspace.OrderComparator<T extends Workspace>
static class
Workspace.ParentWorkspaceSelector
Select the workspaces which are sons of the given parent Workspace.static class
Workspace.TextSelector
Deprecated.since JCMS-6614, useWorkspace.TitleSelector
static class
Workspace.TitleSelector
Select a set of workspace by their name.-
Nested classes/interfaces inherited from class com.jalios.jcms.Data
Data.AuthorComparator<T extends Data>, Data.AuthorizedSelector, 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 protected java.util.ArrayList<Member>
administrators
protected java.util.ArrayList<java.lang.String>
administratorsDBID
protected int
alertThreshold
static java.lang.String
ALL_WORKSPACE_ICON
protected Data
cachedHomeData
protected boolean
cachedHomePortal
protected java.util.HashSet<Category>
catSet
protected int
classificationLevel
protected java.util.HashMap<java.lang.Class<?>,java.util.Set<Publication>>
classPubSetMap
protected java.lang.ref.WeakReference<PortletCollection>
collaborativeSpace
static java.lang.String
COLLABORATIVESPACE_CLASSNAME
protected java.lang.Class<?>
collaborativeSpaceClass
protected FileAnalyzerThread
currentAnalyzerThread
protected Group
defaultGroup
protected WorkspaceFileSizeResult
fileAnalyzer
protected java.util.TreeSet<Group>
groupSet
protected PortalInterface
homePortal
protected java.lang.String
incomingMailLocalPart
protected java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>>
instanceWorkflowGroupMap
protected java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>>
instanceWorkflowIdMap
protected boolean
isClosed
protected boolean
isIncomingMailEnabled
protected boolean
isModel
protected java.lang.String
language
static java.lang.String
LAST_QUOTA_NOTIFICATION_DATE
protected long
lastQuotaNotificationDate
protected int
minClassificationLevel
protected int
order
protected Workspace
parent
static java.lang.String
PARENT_WORKSPACE_PARAMNAME
static java.lang.String
PORTALJSPCOLLECTION_CLASSNAME
protected WorkspaceFileSizeResult
previousFileAnalyzer
protected java.util.TreeSet<Publication>
pubSet
protected long
quota
protected QuotaElement
quotaAlert
protected java.util.HashMap<java.lang.String,WKRole>
roleMap
protected Category
tagRoot
protected java.lang.String
title
protected java.util.HashMap<java.lang.String,java.lang.String>
titleML
protected java.util.HashMap<java.lang.Class<?>,java.lang.Object>
typeMap
protected boolean
useDefaultQuota
protected java.util.HashMap<java.lang.Class<?>,java.lang.Boolean>
wfByInstanceMap
static java.lang.String
WORKSPACE_CLOSED_ICON
static java.lang.String
WORKSPACE_CS_CLOSED_ICON
static java.lang.String
WORKSPACE_CS_ICON
static java.lang.String
WORKSPACE_CS_MODEL_ICON
static java.lang.String
WORKSPACE_DELETION_CONTROLLER_CTXT
static java.lang.String
WORKSPACE_ICON
static java.lang.String
WORKSPACE_MODEL_CLOSED_ICON
static java.lang.String
WORKSPACE_MODEL_ICON
-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
Checks if the specified member is authorized to read this Data.boolean
canPublish(java.lang.Class clazz)
Checks if the given class can be published in this workspace.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.ControllerStatus
checkMember(int op, Member mbr, java.util.Map context)
Checks if the given member can perform the given operation.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
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)
void
flushHomeUrl()
Reset the cache of the home category.static DataSelector
getActiveWorkspaceSelector()
Returns the selector for active Workspaces (Not a model, and not closed)java.util.ArrayList<Member>
getAdministrators()
Retrieve administrators of this workspace (including DBMember).java.util.ArrayList<Member>
getAdministrators(boolean queryDB)
Retrieve administrators of this workspace.java.util.ArrayList<java.lang.String>
getAdministratorsDBID()
Retrieve the ids of DBMember configured as administrators of this workspace.int
getAlertThreshold()
java.util.Set<Workspace>
getAllSubWorkspaces()
Return all the descendant Workspaces of the current Workspace.java.util.Set<Workspace>
getAllSubWorkspaces(Member loggedMember)
Return all the descendant Workspaces of the current Workspace.
If theloggedMember
parameter is not null, only Workspaces for which the Member is Worker are returned.static java.util.SortedSet<Workspace>
getAllWorkingWorkspaceSet(Member loggedMember, JcmsContext jcmsContext)
Gives the list of workspaces for which the current loggedMember is a worker.static java.util.Set<Workspace>
getAllWorkspaceSet()
Returns a Set with all workspace, model or not.static java.util.Set<Workspace>
getAllWorkspaceSet(Member member)
Returns a Set of workspace, for the given member.static java.util.Set<Workspace>
getAllWorkspaceSetModel()
Returns a Set with all workspace model.static java.util.Set<Workspace>
getAllWorkspaceSetWithoutModel()
Returns a Set with all workspace without workspace model.java.util.HashSet<Category>
getCatSet()
java.util.Set<Category>
getCatSet(Member mbr)
Gives the root categories for this Workspace, that the given member may read.int
getClassificationLevel()
Retrieve the classification level of this workspace.java.util.HashMap<java.lang.Class<?>,java.util.Set<Publication>>
getClassPubSetMap()
PortletCollection
getCollaborativeSpace()
Returns the CollaborativeSpace associated to this workspace (or null if none).static java.util.Comparator<Workspace>
getComparator(java.lang.String str, boolean reverse)
Deprecated.static java.lang.String
getCSVHeader(java.lang.String lang)
Returns the CSV header of this objectFileAnalyzerThread
getCurrentAnalyzerThread()
Return the current analyzer thread if analyze is in progressjava.lang.String
getDataIcon()
Returns source information for the icon associated to this Data, either a relative path or sprite classes name.java.lang.String
getDataIconAlt(java.lang.String lang)
Returns the alternative text (alt attribute) to use in the HTML IMG tag of this Data's icon.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.Group
getDefaultGroup()
Returns the default group for this workspace.Group
getDefaultGroup(boolean search)
Returns the default group for this workspace.int
getEffectiveClassificationLevel()
Retrieve the effective classification level of this workspace using baseline classification level configured on site.static java.util.Comparator<Workspace>
getFavoriteComparator(Member mbr, java.lang.String lang)
Returns a new Comparator instance to compare workspace based on member engagement.WorkspaceFileSizeResult
getFileAnalyzer(boolean refresh)
returnsWorkspaceFileSizeResult
instance associated with this workspace.ObjectLongTreeMap
getFileSizeMap(boolean refresh)
Returns the map file size for each content-type.Category
getFirstWorkspaceCat(Category cat)
Returns first workspace category mathching (or parent) given category.java.util.TreeSet<Group>
getGroupSet()
static java.util.Comparator<Workspace>
getGroupSizeComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on the number of groups in each workspace.PortalInterface
getHomePortal()
Retrieves the home portal for current Workspace by searching through its PortalInterface which could be a Portal, a PortalJspCollection or a CollaborativeSpacejava.lang.String
getHomeUrl(java.util.Locale userLocale)
Returns the home url for the given workspace calculated from portal categories that belongs to workspaceprotected Category
getHomeUrlVisitor(java.util.Collection<Category> collect, java.util.Set<Publication> portalSet)
Internal methods to check home urljava.lang.String
getIcon()
Returns the image path icon for the given workspacejava.lang.String
getIncomingAddress(Member member)
Computes an incoming e-mail for given Member.java.lang.String
getIncomingAddress(Member member, boolean useLabel)
Computes an incoming e-mail for given Member.java.lang.String
getIncomingMailDefaultLocalPart()
java.lang.String
getIncomingMailLocalPart()
java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>>
getInstanceWorkflowGroupMap()
java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>>
getInstanceWorkflowIdMap()
java.lang.String
getLanguage()
long
getLastQuotaNotificationDate()
PortalInterface
getMainPortal()
int
getMemberCount(boolean includeDBMember)
Returns the member count for this workspace.java.util.Set<Member>
getMemberSet()
Deprecated.since JCMS-5751, useAllMemberQueryHandler
java.util.Set<Member>
getMemberSet(boolean includeDBMember)
Deprecated.since JCMS-5751, useAllMemberQueryHandler
static java.util.Comparator<Workspace>
getMemberSizeComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on the number of members in each workspace.int
getMinClassificationLevel()
Retrieve the minimum classification level of publication authorized in this workspace.static java.util.Comparator<Workspace>
getNameComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on their title.int
getOrder()
static java.util.Comparator<Workspace>
getOrderComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on their order.java.util.List<Content>
getOtherWorkspaceContentList(Member mbr, int firstResult, int maxResults)
Returns the list of contents of other workspaces shared in this workspace.Workspace
getParent()
Workspace
getParent(Member loggedMember)
Get the Parent workspace from the one in parameter, if loggedMember is not null, the WS is return only if he is worker of it.WorkspaceFileSizeResult
getPreviousFileAnalyzer()
returns previousWorkspaceFileSizeResult
instance associated with this workspace if any.java.util.Set<Publication>
getPublicationSet(Workflow workflow)
Return all publication for a given Workflowjava.util.Set<Publication>
getPublicationSet(Workflow workflow, boolean specialState)
Return all the publication in/not a special state for the given Workflow<T extends Publication>
java.util.Set<T>getPublicationSet(java.lang.Class<?> clazz)
Return all publication for a given Clazz<T extends Publication>
java.util.Set<T>getPublicationSet(java.lang.Class<?> clazz, boolean specialState)
Return all the publication in/not a special state for the given classjava.util.TreeSet<Publication>
getPubSet()
long
getQuota()
QuotaElement
getQuotaAlert()
static Workspace
getRequestWorkspace(javax.servlet.http.HttpServletRequest request)
Get the workspace stored in the requestWKRole
getRole(WFRole wfRole)
Get the WKRole linked to a WFRole for a given WorkflowWKRole
getRole(java.lang.String wfRoleId)
Get the WKRole linked to a WFRole for a given Workflowjava.util.HashMap<java.lang.String,WKRole>
getRoleMap()
Getter of RoleMapstatic java.util.Set<Workspace>
getRootWorkspaces(java.util.Comparator<Workspace> comparator)
All Workspaces with no parent, sorted with comparator if not null.static java.util.Set<Workspace>
getRootWorkspaces(java.util.Comparator<Workspace> comparator, Member loggedMember)
All Workspaces with no parent the loggedMember in parameter belongs to, sorted with comparator if not null.static Workspace
getSessionWorkspace(javax.servlet.http.HttpSession session)
Get the workspace stored in the sessionjava.util.List<Content>
getSharedContentList(Member mbr, int firstResult, int maxResults)
Returns the list of content of this workspace shared with other workspaces.<T> java.util.Set<java.lang.Class<? extends T>>
getSubTypeSet(java.lang.Class<T> clazz)
Returns a set of types used in this Workspace, extending the given class.<T> java.util.Set<java.lang.Class<? extends T>>
getSubTypeSet(java.lang.Class<T> clazz, Member mbr)
Returns a set of types used in this Workspace, extending the given class and that the given member can publish.<T> java.util.Set<java.lang.Class<? extends T>>
getSubTypeSet(java.lang.Class<T> clazz, Member mbr, java.util.Map<java.lang.String,?> contextMap)
Returns a set of types used in this Workspace, extending the given class and that the given member can publish.java.util.Set<Workspace>
getSubWorkspaces()
Gives the set of all WS just under the ws in parameter.java.util.Set<Workspace>
getSubWorkspaces(Member loggedMember)
Return the workspaces just under the workspace in parameter.Category
getTagRoot()
java.lang.String
getTitle()
Get the value of title.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 Workspace in language other than the main site language.java.util.Collection<? extends TreeNode>
getTreeChildren()
Returns a Collection of TreeNode children of the current nodeWorkspace
getTreeParent()
Returns parent of the current nodeTreeNode
getTreeRoot()
Returns the root of the current nodejava.lang.String
getTypeDescription(java.lang.Class clazz, java.lang.String lang)
Returns the description for the given type (class) in the given language.java.lang.String
getTypeLabel(java.lang.Class clazz, java.lang.String lang)
Returns the label for the given type (class) in the given language.java.util.HashMap<java.lang.Class<?>,java.lang.Object>
getTypeMap()
Getter of TypeMapjava.util.Set<java.lang.Class<?>>
getTypeSet()
Returns a Set of all visible typesboolean
getUseDefaultQuota()
java.util.HashMap<java.lang.Class<?>,java.lang.Boolean>
getWfByInstanceMap()
WFRole
getWFRole(WKRole wkRole)
Returns the WFRole bound to the given WKRole.java.util.Set<java.lang.String>
getWFRoleIdSet()
Return a set of all WFRoleIdjava.util.Set<WFRole>
getWFRoleSet()
Return a set of all WFRolejava.util.Set<WKRole>
getWKRoleSet()
Return a set of all WKRolejava.util.Set<WKRole>
getWKRoleSet(Workflow wf)
Return all the WKRole for a given Workflowjava.util.Set<WKRole>
getWKRoleSet(java.lang.Class clazz)
Return all the WKRole for a given ClassWorkflow
getWorkflow(java.lang.Class clazz)
Find the Worflow associated to the given class.Workflow
getWorkflow(java.lang.Class<?> clazz, boolean checkSuperclass)
Find the Worflow associated to the given class or one of it's super class.java.util.Set<Workflow>
getWorkflowSet()
Returns a Set of all workflow used by calling getWorkflow(clazz,false) on all clazz.WSTypeEntry
getWSTypeEntry(java.lang.Class clazz)
Returns a WSTypeEntry describing custom properties for a given type in a given workspace.WSTypeEntry
getWSTypeEntry(java.lang.String className)
Returns a WSTypeEntry describing custom properties for a given type in a given workspace.void
handleFileAnalyzeEnd(WorkspaceFileSizeResult fileAnalyzer)
This method is called when global file analyzer has endboolean
hasDBMember()
Returns true if DBMembers belong to this workspaceboolean
hasWKRole(WFRole wfRole)
Check if a WKRole exists in this workspace for the specified WFRoleboolean
hasWKRole(java.lang.String wfRoleId)
Check if a WKRole exists in this workspace for the specified WFRole idboolean
hasWorkflow(java.lang.Class clazz)
Check if the type is linked to a workflow for this workspaceprotected boolean
internalCanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
void
invalidateHasDBMember()
Invalidate the cache for hasDBMember method.boolean
isAdmin(Member member)
Check if the member is an administrator of the workspace or of the channelboolean
isClassified()
Check if this workspace is classified.boolean
isClosed()
Getter for isClosed.boolean
isCollaborativeSpace()
Returns true if this workspace is a CollaborativeSpace (i.e.boolean
isFavorite(Member member)
Returns true if this workspace is a favorite workspace for given Member.boolean
isIncomingMailEnabled()
boolean
isMember(Member member)
Returns true if the given member belongs tho this workspace.boolean
isModel()
Getter for modelboolean
isOpen()
boolean
isTreeLeaf()
Returns boolean true if the TreeNode is a leafboolean
isTreeNode()
Returns boolean true if the TreeNode is a nodeboolean
isWorkspaceCat(Category cat)
Checks if the given category is a workspace category or a descendent of worspace categories.void
linkRole(WFRole wfRole, WKRole wkRole)
Link into the workspace a WFRole to a WKRoleprotected void
performAfterWrite(int op, Member mbr, java.util.Map context)
Called to perform some action after the write.void
performDelete(Member mbr, java.util.Map context)
Performs data deletionvoid
performUpdate(Member mbr, java.util.Map context)
Performs data update.void
setAdministrators(java.util.ArrayList<Member> administrators)
void
setAdministratorsDBID(java.util.ArrayList<java.lang.String> dbMbrIds)
Set the ids of DBMember to configure as administrators of this workspace.void
setAlertThreshold(int alertThreshold)
void
setCatSet(java.util.HashSet<Category> catSet)
void
setClassificationLevel(java.lang.Integer level)
Set the classification level of this workspace.void
setClosed(boolean closed)
Setter for isClosedvoid
setDefaultGroup(Group defaultGroup)
Set the default group for this workspace.void
setIncomingMailEnabled(boolean enable)
void
setIncomingMailLocalPart(java.lang.String localPart)
void
setInstanceWorkflowGroupMap(java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> instanceWorkflowGroupMap)
void
setInstanceWorkflowIdMap(java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> instanceWorkflowIdMap)
void
setLanguage(java.lang.String language)
void
setLastQuotaNotificationDate(long lastQuotaNotificationDate)
void
setMainPortal(PortalInterface mainPortal)
void
setMinClassificationLevel(java.lang.Integer level)
Set the minimum classification level of publication authorized in this workspace.void
setModel(boolean model)
Setter for modelvoid
setOrder(int order)
void
setParent(Workspace parent)
void
setQuota(long quota)
void
setQuotaAlert(QuotaElement quotaAlert)
static void
setRequestWorkspace(javax.servlet.http.HttpServletRequest request, Workspace workspace)
Set the given workspace to the request.void
setRole(WFRole wfRole, WKRole wkRole)
Binds a WKRole to a WFRolevoid
setRoleMap(java.util.HashMap<java.lang.String,WKRole> roleMap)
Setter of RoleMapstatic void
setSessionWorkspace(javax.servlet.http.HttpSession session, Workspace workspace)
Set the given workspace to the session.void
setTagRoot(Category tagRoot)
void
setTitle(java.lang.String v)
Set the value of title.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 Workspace in language other than the main site language.void
setTypeMap(java.util.HashMap<java.lang.Class<?>,java.lang.Object> typeMap)
Setter of TypeMapvoid
setTypeWorkflow(java.lang.Class<?> clazz, Workflow wf)
Link a Workflow to a given Class.void
setUseDefaultQuota(boolean useDefaultQuota)
void
setWfByInstanceMap(java.util.HashMap<java.lang.Class<?>,java.lang.Boolean> wfByInstanceMap)
boolean
setWSTypeEntry(java.lang.Class<?> clazz, WSTypeEntry wste)
Link a WSTypeEntry to a given Class.protected void
splitHybridCollections(Data previousData)
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.java.lang.String
toCSV(java.lang.String lang)
Returns a CSV view of this objectjava.lang.String
toString()
void
updateGroupSet(Group grp, boolean add)
Update the groupSet indexvoid
updatePubSet(Publication pub, boolean add)
Update pubSet index-
Methods inherited from class com.jalios.jcms.Data
canBeReadBy, canBeUnlockedBy, canRequestUnlock, 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, getDataIconCSS, getDataIconHtml, getDataIconHtml, getDataIconTitle, getDataImage, getDataImage, getDataImage, getDataNameComparator, getDate, getDate, getDateSelector, getDeletableSelector, getDisplayLink, getDisplayLink, getDisplayLink, getDisplayLinkCss, getDisplayLinkDataAttribute, getDisplayLinkHtmlAttributes, getDisplayUrl, getDoubleFieldValue, getDoubleFieldValue, getExportXmlDataValue, getExtension, getExtraData, getExtraDataMap, getExtraDBData, getExtraDBDataMap, getExtraInfo, getExtraInfoMap, getFieldStatusMap, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getGenericThumbnail, 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, importXml, importXmlFieldsWithReferences, importXmlFiles, importXmlReferences, initializeDBDataCollections, isDBData, isImported, isImportUpdated, isInDatabase, isLocked, isPersisted, isStrongLocked, lock, markNewImport, mergeHybridLink, mergeHybridLink, performBeforeWrite, performCreate, 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, setFieldValue, setImportAuthor, setImportBatch, setImportDate, setImportDisplayUrl, setImportId, setImportMap, setImportMdate, setImportSignature, setImportSource, setImportSourceUrl, setImportUpdated, setIntFieldValue, setLongFieldValue, setMdate, setOpAuthor, setOpAuthorId, setOpDelegate, setRowId, toFullString, unlock, unlock, unmarkNewImport, updateDisplayLinkCss, updateDisplayLinkDataAttribute, 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, setCdate, setDdate, setId, setStore, toXml
-
-
-
-
Field Detail
-
WORKSPACE_DELETION_CONTROLLER_CTXT
public static final java.lang.String WORKSPACE_DELETION_CONTROLLER_CTXT
- See Also:
- Constant Field Values
-
COLLABORATIVESPACE_CLASSNAME
public static final java.lang.String COLLABORATIVESPACE_CLASSNAME
- See Also:
- Constant Field Values
-
PORTALJSPCOLLECTION_CLASSNAME
public static final java.lang.String PORTALJSPCOLLECTION_CLASSNAME
- See Also:
- Constant Field Values
-
LAST_QUOTA_NOTIFICATION_DATE
public static final java.lang.String LAST_QUOTA_NOTIFICATION_DATE
- See Also:
- Constant Field Values
-
title
protected java.lang.String title
-
titleML
protected java.util.HashMap<java.lang.String,java.lang.String> titleML
-
order
protected int order
-
administrators
protected java.util.ArrayList<Member> administrators
-
administratorsDBID
protected java.util.ArrayList<java.lang.String> administratorsDBID
-
typeMap
protected java.util.HashMap<java.lang.Class<?>,java.lang.Object> typeMap
-
wfByInstanceMap
protected java.util.HashMap<java.lang.Class<?>,java.lang.Boolean> wfByInstanceMap
-
instanceWorkflowIdMap
protected java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> instanceWorkflowIdMap
-
instanceWorkflowGroupMap
protected java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> instanceWorkflowGroupMap
-
roleMap
protected java.util.HashMap<java.lang.String,WKRole> roleMap
-
catSet
protected java.util.HashSet<Category> catSet
-
isModel
protected boolean isModel
-
isClosed
protected boolean isClosed
-
language
protected java.lang.String language
-
tagRoot
protected Category tagRoot
-
parent
protected Workspace parent
-
defaultGroup
protected Group defaultGroup
-
isIncomingMailEnabled
protected boolean isIncomingMailEnabled
-
incomingMailLocalPart
protected java.lang.String incomingMailLocalPart
-
alertThreshold
protected int alertThreshold
-
quota
protected long quota
-
useDefaultQuota
protected boolean useDefaultQuota
-
classificationLevel
protected int classificationLevel
-
minClassificationLevel
protected int minClassificationLevel
-
groupSet
protected transient java.util.TreeSet<Group> groupSet
-
pubSet
protected transient java.util.TreeSet<Publication> pubSet
-
classPubSetMap
protected transient java.util.HashMap<java.lang.Class<?>,java.util.Set<Publication>> classPubSetMap
-
fileAnalyzer
protected transient WorkspaceFileSizeResult fileAnalyzer
-
previousFileAnalyzer
protected transient WorkspaceFileSizeResult previousFileAnalyzer
-
currentAnalyzerThread
protected transient FileAnalyzerThread currentAnalyzerThread
-
lastQuotaNotificationDate
protected transient long lastQuotaNotificationDate
-
quotaAlert
protected transient QuotaElement quotaAlert
-
collaborativeSpaceClass
protected transient java.lang.Class<?> collaborativeSpaceClass
-
collaborativeSpace
protected transient java.lang.ref.WeakReference<PortletCollection> collaborativeSpace
-
PARENT_WORKSPACE_PARAMNAME
public static java.lang.String PARENT_WORKSPACE_PARAMNAME
-
WORKSPACE_ICON
public static final java.lang.String WORKSPACE_ICON
- See Also:
- Constant Field Values
-
WORKSPACE_MODEL_ICON
public static final java.lang.String WORKSPACE_MODEL_ICON
- See Also:
- Constant Field Values
-
WORKSPACE_CLOSED_ICON
public static final java.lang.String WORKSPACE_CLOSED_ICON
- See Also:
- Constant Field Values
-
WORKSPACE_CS_ICON
public static final java.lang.String WORKSPACE_CS_ICON
- See Also:
- Constant Field Values
-
WORKSPACE_CS_MODEL_ICON
public static final java.lang.String WORKSPACE_CS_MODEL_ICON
- See Also:
- Constant Field Values
-
WORKSPACE_CS_CLOSED_ICON
public static final java.lang.String WORKSPACE_CS_CLOSED_ICON
- See Also:
- Constant Field Values
-
WORKSPACE_MODEL_CLOSED_ICON
public static final java.lang.String WORKSPACE_MODEL_CLOSED_ICON
- See Also:
- Constant Field Values
-
ALL_WORKSPACE_ICON
public static final java.lang.String ALL_WORKSPACE_ICON
- See Also:
- Constant Field Values
-
cachedHomeData
protected transient Data cachedHomeData
-
cachedHomePortal
protected transient boolean cachedHomePortal
-
homePortal
protected transient PortalInterface homePortal
-
-
Constructor Detail
-
Workspace
public Workspace()
-
Workspace
public Workspace(Workspace other)
-
-
Method Detail
-
checkWrite
public ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)
Description copied from class:Data
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
-
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)
-
getRootWorkspaces
public static java.util.Set<Workspace> getRootWorkspaces(java.util.Comparator<Workspace> comparator)
All Workspaces with no parent, sorted with comparator if not null.- Parameters:
comparator
- the comparator- Returns:
- All orphean WS
- Since:
- jcms-7.0.0
-
getRootWorkspaces
public static java.util.Set<Workspace> getRootWorkspaces(java.util.Comparator<Workspace> comparator, Member loggedMember)
All Workspaces with no parent the loggedMember in parameter belongs to, sorted with comparator if not null.- Parameters:
comparator
- the comparatorloggedMember
- the loggedMember- Returns:
- All orphean WS, as seen for loggedMember
- Since:
- jcms-7.0.0
-
getParent
public Workspace getParent(Member loggedMember)
Get the Parent workspace from the one in parameter, if loggedMember is not null, the WS is return only if he is worker of it.- Parameters:
loggedMember
- the logged member- Returns:
- The Parent WS if loggedMember is worker of it
-
setDefaultGroup
public void setDefaultGroup(Group defaultGroup)
Set the default group for this workspace.- Parameters:
defaultGroup
- the default group.- Since:
- jcms-7.0.0
-
getDefaultGroup
public Group getDefaultGroup()
Returns the default group for this workspace. If there is no default group, returns the group with lesser DataRight.- Returns:
- the default group for this workspace.
- Since:
- jcms-7.0.0
-
getDefaultGroup
public Group getDefaultGroup(boolean search)
Returns the default group for this workspace.- Parameters:
search
- if true and if there is no default group, returns the group with lesser DataRight.- Returns:
- the default group for this workspace.
- Since:
- jcms-7.0.0
-
getSubWorkspaces
public java.util.Set<Workspace> getSubWorkspaces()
Gives the set of all WS just under the ws in parameter.- Returns:
- All children ws in a Set.
-
getSubWorkspaces
public java.util.Set<Workspace> getSubWorkspaces(Member loggedMember)
Return the workspaces just under the workspace in parameter. If the loggedMember parameter is not null, only workspaces for which the loggedMember is worker are returned.- Parameters:
loggedMember
- Only Workspaces for which the loggedMember is Worker are returned- Returns:
- All the ws sons of the workspace in parameter for which the loggedMember is worker.
-
getAllSubWorkspaces
public java.util.Set<Workspace> getAllSubWorkspaces()
Return all the descendant Workspaces of the current Workspace.- Returns:
- All descendant Workspaces in a Set.
-
getAllSubWorkspaces
public java.util.Set<Workspace> getAllSubWorkspaces(Member loggedMember)
Return all the descendant Workspaces of the current Workspace.
If theloggedMember
parameter is not null, only Workspaces for which the Member is Worker are returned.- Parameters:
loggedMember
- Only Workspaces for which this Member is Worker are returned- Returns:
- All the descendant Workspaces of the current Workspace for which the loggedMember is Worker.
-
getTreeParent
public Workspace getTreeParent()
Description copied from interface:TreeNode
Returns parent of the current node- Specified by:
getTreeParent
in interfaceTreeNode
- Returns:
- TreeNode parent Node
-
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
-
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
-
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
-
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
-
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
-
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
-
getIcon
public java.lang.String getIcon()
Returns the image path icon for the given workspace- Returns:
- String image relative path
- Since:
- jcms-5.5.0
-
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 :
-
getDataIconAlt
public java.lang.String getDataIconAlt(java.lang.String lang)
Description copied from class:Data
Returns the alternative text (alt attribute) to use in the HTML IMG tag of this Data's icon.If this method behavior has not been overriden by subclass, the default alternative text can be declared using language property
types.{Type}.alt
, where{Type}
is the short class name of the type concerned.For example :
[en.prop]
types.Workspace.alt: Workspace
[fr.prop]
types.Workspace.alt: Espace de travail
- Overrides:
getDataIconAlt
in classData
- Parameters:
lang
- the user language- Returns:
- the alt Html attribute for the IMG Html tag, or empty string if non alternative text was define in property.
- See Also:
Data.getDataIconHtml(String)
-
flushHomeUrl
public void flushHomeUrl()
Reset the cache of the home category. Should only be called by category, publication and workspace listeners
-
getHomePortal
public PortalInterface getHomePortal()
Retrieves the home portal for current Workspace by searching through its PortalInterface which could be a Portal, a PortalJspCollection or a CollaborativeSpace- Returns:
- the home portal of current Workspace
- Since:
- jcms-9.0.0
-
getHomeUrl
public java.lang.String getHomeUrl(java.util.Locale userLocale)
Returns the home url for the given workspace calculated from portal categories that belongs to workspace- Parameters:
userLocale
- the user local- Returns:
- String
-
getHomeUrlVisitor
protected Category getHomeUrlVisitor(java.util.Collection<Category> collect, java.util.Set<Publication> portalSet)
Internal methods to check home url- Parameters:
collect
- a collection of category to checkportalSet
- the portal set- Returns:
- Category the hoem category
-
isWorkspaceCat
public boolean isWorkspaceCat(Category cat)
Checks if the given category is a workspace category or a descendent of worspace categories.- Parameters:
cat
- the child category- Returns:
- true if the given category is a workspace category or a descendent of worspace categories.
- Since:
- jcms 4.1
-
getFirstWorkspaceCat
public Category getFirstWorkspaceCat(Category cat)
Returns first workspace category mathching (or parent) given category.- Parameters:
cat
- the child category- Returns:
- category the workspace category.
- Since:
- jcms 5.7.4
-
getAllWorkspaceSet
public static java.util.Set<Workspace> getAllWorkspaceSet()
Returns a Set with all workspace, model or not. CAUTION: DO NOT alter the returned set, clone prior modification.- Returns:
- Set of Workspace
- Since:
- jcms-5.5.0
-
getAllWorkspaceSet
public static java.util.Set<Workspace> getAllWorkspaceSet(Member member)
Returns a Set of workspace, for the given member. If the Member is an Admin return all workspace (model or not) If member is not null return workspace's member otherwise return empty TreeSet.- Parameters:
member
- the working member- Returns:
- Set of Workspace
- Since:
- jcms-5.5.0
-
getAllWorkspaceSetWithoutModel
public static java.util.Set<Workspace> getAllWorkspaceSetWithoutModel()
Returns a Set with all workspace without workspace model.- Returns:
- Set of Workspace
- Since:
- jcms-5.5.0
-
getAllWorkspaceSetModel
public static java.util.Set<Workspace> getAllWorkspaceSetModel()
Returns a Set with all workspace model.- Returns:
- Set of Workspace
- Since:
- jcms-5.5.0
-
getAllWorkingWorkspaceSet
public static java.util.SortedSet<Workspace> getAllWorkingWorkspaceSet(Member loggedMember, JcmsContext jcmsContext)
Gives the list of workspaces for which the current loggedMember is a worker.- Parameters:
loggedMember
- the current logged memberjcmsContext
- the current jcmsContext- Returns:
- the sorted, regarding to the title in the current language, set of workspace for which the logged member is worker
-
getWorkflow
public Workflow getWorkflow(java.lang.Class clazz)
Find the Worflow associated to the given class. This method also check for super class.- Parameters:
clazz
- the class- Returns:
- the workflow linked to the given class.
- Since:
- jcms-4.1
- See Also:
getWorkflow(Class, boolean)
-
getWorkflow
public Workflow getWorkflow(java.lang.Class<?> clazz, boolean checkSuperclass)
Find the Worflow associated to the given class or one of it's super class. Since jcms-5.5.0, the workflow stored in the typeMap may be a String or a WSTypeEntry- Parameters:
clazz
- the target classcheckSuperclass
- should check super class- Returns:
- the workflow linked to the given class.
- Since:
- jcms-4.1
- See Also:
getWorkflow(Class)
-
getWSTypeEntry
public WSTypeEntry getWSTypeEntry(java.lang.Class clazz)
Returns a WSTypeEntry describing custom properties for a given type in a given workspace. WARNING: If Workspace doesn't handle a WSTypeEntry for this class it will return a fake WSTypeEntry.- Parameters:
clazz
- the target class- Returns:
- WSTypeEntry the type description or null if it doesn't exists
- Since:
- jcms-5.5.0
-
getWSTypeEntry
public WSTypeEntry getWSTypeEntry(java.lang.String className)
Returns a WSTypeEntry describing custom properties for a given type in a given workspace. WARNING: If Workspace doesn't handle a WSTypeEntry for this class it will return a fake WSTypeEntry.- Parameters:
className
- the target class name- Returns:
- WSTypeEntry the type description or null if it doesn't exists
- Since:
- jcms-5.5.0
-
getTypeLabel
public java.lang.String getTypeLabel(java.lang.Class clazz, java.lang.String lang)
Returns the label for the given type (class) in the given language.- Parameters:
clazz
- the classlang
- the language- Returns:
- the label for the given type in the given language.
-
getTypeDescription
public java.lang.String getTypeDescription(java.lang.Class clazz, java.lang.String lang)
Returns the description for the given type (class) in the given language.- Parameters:
clazz
- the classlang
- the language- Returns:
- the description for the given type (class) in the given language.
-
hasWorkflow
public boolean hasWorkflow(java.lang.Class clazz)
Check if the type is linked to a workflow for this workspace- Parameters:
clazz
- the class to check- Returns:
- true if the type is linked to a workflow
- Since:
- jcms-4.1
-
getTypeSet
public java.util.Set<java.lang.Class<?>> getTypeSet()
Returns a Set of all visible types- Returns:
- a Set of all visible types (String)
- Since:
- jcms-4.1
-
getSubTypeSet
public <T> java.util.Set<java.lang.Class<? extends T>> getSubTypeSet(java.lang.Class<T> clazz, Member mbr)
Returns a set of types used in this Workspace, extending the given class and that the given member can publish.- Parameters:
clazz
- the classmbr
- the member- Returns:
- a set of types used in this Workspace, extending the given class and that the given member can publish.
- Since:
- jcms-9.0.0
-
getSubTypeSet
public <T> java.util.Set<java.lang.Class<? extends T>> getSubTypeSet(java.lang.Class<T> clazz, Member mbr, java.util.Map<java.lang.String,?> contextMap)
Returns a set of types used in this Workspace, extending the given class and that the given member can publish.- Parameters:
clazz
- the classmbr
- the membercontextMap
- an optional context map providing information on publish request context, may be null- Returns:
- a set of types used in this Workspace, extending the given class and that the given member can publish.
- Since:
- jcms-10.0.6 / JCMS-8882
-
getSubTypeSet
public <T> java.util.Set<java.lang.Class<? extends T>> getSubTypeSet(java.lang.Class<T> clazz)
Returns a set of types used in this Workspace, extending the given class.- Parameters:
clazz
- the class- Returns:
- a set of types used in this Workspace, extending the given class.
- Since:
- jcms-10.0.5
-
canPublish
public boolean canPublish(java.lang.Class clazz)
Checks if the given class can be published in this workspace.- Parameters:
clazz
- the Class for which publication authorization should be verified- Returns:
- true if the given class can be published in this workspace
- Since:
- jcms-4.1
-
getWorkflowSet
public java.util.Set<Workflow> getWorkflowSet()
Returns a Set of all workflow used by calling getWorkflow(clazz,false) on all clazz.- Returns:
- a Set of all workflow used
- Since:
- jcms-4.1
-
setTypeWorkflow
public void setTypeWorkflow(java.lang.Class<?> clazz, Workflow wf)
Link a Workflow to a given Class. Warning since jcms-5.5.0 Workspace may use a WSTypeEntry. You may also use setWSTypeEntry(Class,WSTypeEntry) If the given class is linked to a WSTypeEntry then this method will throw a RuntimeException.- Parameters:
clazz
- the clazz to linkwf
- the workflow to link- Since:
- jcms-5.5.0
- See Also:
setWSTypeEntry(Class, WSTypeEntry)
-
setWSTypeEntry
public boolean setWSTypeEntry(java.lang.Class<?> clazz, WSTypeEntry wste)
Link a WSTypeEntry to a given Class. If WSTypeEntry.isSameProperties() than channel properties then do not store the WSTypeEntry. Warning: Caller must create, update or delete the WSTypeEntry this method is only a convenient setter- Parameters:
clazz
- the clazz to linkwste
- the WSTypeEntry to link with- Returns:
- boolean true if the WSTypeEntry is used or false if it is same
- Since:
- jcms-5.5.0
-
getPublicationSet
public java.util.Set<Publication> getPublicationSet(Workflow workflow)
Return all publication for a given Workflow- Parameters:
workflow
- the workflow- Returns:
- a Set of publication
- Since:
- jcms-4.1
-
getPublicationSet
public java.util.Set<Publication> getPublicationSet(Workflow workflow, boolean specialState)
Return all the publication in/not a special state for the given Workflow- Parameters:
workflow
- the workflowspecialState
- the state- Returns:
- a Set of publication
- Since:
- jcms-4.1
-
getPubSet
public java.util.TreeSet<Publication> getPubSet()
- Returns:
- Returns the pubSet.
- Since:
- jcms-4.1
-
updatePubSet
public void updatePubSet(Publication pub, boolean add)
Update pubSet index- Parameters:
pub
- the publication to be added or removedadd
- add if true, remove if false- Since:
- jcms-5.0.1
-
getClassPubSetMap
public java.util.HashMap<java.lang.Class<?>,java.util.Set<Publication>> getClassPubSetMap()
- Returns:
- map(class, pubSet)
- Since:
- jcms-4.1
-
getPublicationSet
public <T extends Publication> java.util.Set<T> getPublicationSet(java.lang.Class<?> clazz, boolean specialState)
Return all the publication in/not a special state for the given class- Type Parameters:
T
- a Publication type- Parameters:
clazz
- the classspecialState
- the state- Returns:
- a Set of publication
- Since:
- jcms-4.1
-
getPublicationSet
public <T extends Publication> java.util.Set<T> getPublicationSet(java.lang.Class<?> clazz)
Return all publication for a given Clazz- Type Parameters:
T
- a Publication type- Parameters:
clazz
- the class- Returns:
- a Set of publication
- Since:
- jcms-4.1
-
getWFRole
public WFRole getWFRole(WKRole wkRole)
Returns the WFRole bound to the given WKRole.- Parameters:
wkRole
- the WKRole to look for.- Returns:
- the WFRole bound to the given WKRole.
- Since:
- jcms-5.0.5
-
getRole
public WKRole getRole(WFRole wfRole)
Get the WKRole linked to a WFRole for a given Workflow- Parameters:
wfRole
- the role- Returns:
- WKRole associated to the given WFRole
- Since:
- jcms-4.1
-
setRole
public void setRole(WFRole wfRole, WKRole wkRole)
Binds a WKRole to a WFRole- Parameters:
wfRole
- the WFRolewkRole
- the WKRole- Since:
- jcms-5.5.0
-
getRole
public WKRole getRole(java.lang.String wfRoleId)
Get the WKRole linked to a WFRole for a given Workflow- Parameters:
wfRoleId
- the role id- Returns:
- WKRole associated to the given WFRole
- Since:
- jcms-4.1
-
hasWKRole
public boolean hasWKRole(java.lang.String wfRoleId)
Check if a WKRole exists in this workspace for the specified WFRole id- Parameters:
wfRoleId
- the id of the WFRole to check- Returns:
- true if the wfRoleID have associated WKRole
- Since:
- jcms-4.1
-
hasWKRole
public boolean hasWKRole(WFRole wfRole)
Check if a WKRole exists in this workspace for the specified WFRole- Parameters:
wfRole
- the WFRole to check- Returns:
- true if the wfRole have associated WKRole
- Since:
- jcms-4.1
-
getWFRoleIdSet
public java.util.Set<java.lang.String> getWFRoleIdSet()
Return a set of all WFRoleId- Returns:
- a set of WFRoleId
- Since:
- jcms-4.1
-
getWFRoleSet
public java.util.Set<WFRole> getWFRoleSet()
Return a set of all WFRole- Returns:
- a set of WFRole
- Since:
- jcms-4.1
-
getWKRoleSet
public java.util.Set<WKRole> getWKRoleSet()
Return a set of all WKRole- Returns:
- a set of WKRole
- Since:
- jcms-4.1
-
getWKRoleSet
public java.util.Set<WKRole> getWKRoleSet(Workflow wf)
Return all the WKRole for a given Workflow- Parameters:
wf
- the workflow- Returns:
- a Set of WKRole
- Since:
- jcms-4.1
-
getWKRoleSet
public java.util.Set<WKRole> getWKRoleSet(java.lang.Class clazz)
Return all the WKRole for a given Class- Parameters:
clazz
- the class- Returns:
- a Set of WKRole
- Since:
- jcms-4.1
-
linkRole
public void linkRole(WFRole wfRole, WKRole wkRole)
Link into the workspace a WFRole to a WKRole- Parameters:
wfRole
- the WFRolewkRole
- the WKRole- Since:
- jcms-4.1
-
isAdmin
public boolean isAdmin(Member member)
Check if the member is an administrator of the workspace or of the channel- Parameters:
member
- the member- Returns:
- true if the member is an administrator
- Since:
- jcms-4.1
-
isMember
public boolean isMember(Member member)
Returns true if the given member belongs tho this workspace.- Parameters:
member
- the member- Returns:
- true if the given member belongs tho this workspace.
- Since:
- jcms-7.1.0
-
getComparator
public static java.util.Comparator<Workspace> getComparator(java.lang.String str, boolean reverse)
Deprecated.- Since:
- jcms-5.0.0
-
getNameComparator
public static java.util.Comparator<Workspace> getNameComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on their title.- Parameters:
lang
- the language in which to compare workspace- Returns:
- a new NameComparator instance
- Since:
- jcms-5.6.1
-
getOrderComparator
public static java.util.Comparator<Workspace> getOrderComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on their order.- Parameters:
lang
- the language in which to compare workspaces'title when order is the same.- Returns:
- a new OrderComparator instance
- Since:
- jcms-5.6.1
-
getGroupSizeComparator
public static java.util.Comparator<Workspace> getGroupSizeComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on the number of groups in each workspace.- Parameters:
lang
- the language in which to compare workspaces'title when number of groups is the same.- Returns:
- a new GroupSizeComparator instance
- Since:
- jcms-5.6.1
-
getMemberSizeComparator
public static java.util.Comparator<Workspace> getMemberSizeComparator(java.lang.String lang)
Returns a new Comparator instance to compare workspace based on the number of members in each workspace.- Parameters:
lang
- the language in which to compare workspaces'title when number of members is the same.- Returns:
- a new MemberSizeComparator instance
- Since:
- jcms-5.6.1
-
getFavoriteComparator
public static java.util.Comparator<Workspace> getFavoriteComparator(Member mbr, java.lang.String lang)
Returns a new Comparator instance to compare workspace based on member engagement.- Parameters:
mbr
- the memberlang
- the language in which to compare workspaces' title as default order criteria.- Returns:
- a new
Workspace.FavoriteComparator
instance - Since:
- jcms-9.0.0
- See Also:
Workspace.FavoriteComparator
-
getActiveWorkspaceSelector
public static DataSelector getActiveWorkspaceSelector()
Returns the selector for active Workspaces (Not a model, and not closed)- Returns:
- the selector to filter active workspaces
- Since:
- jcms-10.0.0
-
getMemberSet
public java.util.Set<Member> getMemberSet()
Deprecated.since JCMS-5751, useAllMemberQueryHandler
Returns a set of members that belongs to groups of this workspace. This method only returns Member (no DBMember).- Returns:
- a new Set containing all members of this Workspace
-
getMemberSet
public java.util.Set<Member> getMemberSet(boolean includeDBMember)
Deprecated.since JCMS-5751, useAllMemberQueryHandler
Returns a set of members that belongs to groups of this workspace.- Parameters:
includeDBMember
- if true it includes for DBMember (up toHibernateManager.getDefaultMaxResults()
).- Returns:
- a new Set containing all members of this Workspace
- Since:
- jcms-7.0.0
-
getMemberCount
public int getMemberCount(boolean includeDBMember)
Returns the member count for this workspace.- Parameters:
includeDBMember
- if true it includes for DBMember.- Returns:
- the member count for this workspace.
- Since:
- jcms-8.0.0
-
hasDBMember
public boolean hasDBMember()
Returns true if DBMembers belong to this workspace- Returns:
- true if DBMembers belong to this workspace
- Since:
- jcms-7.1.1
-
invalidateHasDBMember
public void invalidateHasDBMember()
Invalidate the cache for hasDBMember method.- Since:
- jcms-7.1.1
-
setSessionWorkspace
public static void setSessionWorkspace(javax.servlet.http.HttpSession session, Workspace workspace)
Set the given workspace to the session.- Parameters:
session
- the sessionworkspace
- the workspace- Since:
- jcms-4.1
-
getSessionWorkspace
public static Workspace getSessionWorkspace(javax.servlet.http.HttpSession session)
Get the workspace stored in the session- Parameters:
session
- the session- Returns:
- the workspace in the session
- Since:
- jcms-4.1
-
setRequestWorkspace
public static void setRequestWorkspace(javax.servlet.http.HttpServletRequest request, Workspace workspace)
Set the given workspace to the request.- Parameters:
request
- the requestworkspace
- the workspace- Since:
- jcms-5.0
-
getRequestWorkspace
public static Workspace getRequestWorkspace(javax.servlet.http.HttpServletRequest request)
Get the workspace stored in the request- Parameters:
request
- the request- Returns:
- the workspace in the request
- Since:
- jcms-5.0
-
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 Workspace 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.1
-
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.1
-
getTitle
public java.lang.String getTitle()
Get the value of title.- Returns:
- Value of title.
- Since:
- jcms-4.1
-
setTitle
public void setTitle(java.lang.String v)
Set the value of title.- Parameters:
v
- Value to assign to title.- Since:
- jcms-4.1
-
getTitleML
public java.util.HashMap<java.lang.String,java.lang.String> getTitleML()
Retrieve the HashMap containing the titles of this Workspace in language other than the main site language.- Returns:
- an HashMap of String.
- Since:
- jcms-4.1
-
setTitleML
public void setTitleML(java.util.HashMap<java.lang.String,java.lang.String> v)
Set the HashMap containing the titles of this Workspace in language other than the main site language.- Parameters:
v
- Value to assign to titleML.- Since:
- jcms-4.1
-
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-10.0.1
- See Also:
setTitle(String)
,setTitleML(HashMap)
-
isModel
public boolean isModel()
Getter for model- Returns:
- model is workspace is a model
-
setModel
public void setModel(boolean model)
Setter for model- Parameters:
model
- is workspace is a model
-
isClosed
public boolean isClosed()
Getter for isClosed. Is a workspace is closed, no contribution, no modification on groups are allowed.- Returns:
- isClosed is workspace is Closed For Contribution
-
setClosed
public void setClosed(boolean closed)
Setter for isClosed- Parameters:
closed
- to close this workspace for contribution
-
isOpen
public boolean isOpen()
-
getRoleMap
public java.util.HashMap<java.lang.String,WKRole> getRoleMap()
Getter of RoleMap- Returns:
- the association: Workflow / WfRoleSet
- Since:
- jcms-4.1
-
setRoleMap
public void setRoleMap(java.util.HashMap<java.lang.String,WKRole> roleMap)
Setter of RoleMap- Parameters:
roleMap
- the RoleMap- Since:
- jcms-4.1
-
getTypeMap
public java.util.HashMap<java.lang.Class<?>,java.lang.Object> getTypeMap()
Getter of TypeMap- Returns:
- a Map Class / Workflow Id
- Since:
- jcms-4.1
-
setTypeMap
public void setTypeMap(java.util.HashMap<java.lang.Class<?>,java.lang.Object> typeMap)
Setter of TypeMap- Parameters:
typeMap
- the TypeMap- Since:
- jcms-4.1
-
getOrder
public int getOrder()
- Returns:
- Returns the order.
- Since:
- jcms-4.1
-
setOrder
public void setOrder(int order)
- Parameters:
order
- The order to set.- Since:
- jcms-4.1
-
getGroupSet
public java.util.TreeSet<Group> getGroupSet()
- Returns:
- Returns the groupSet.
- Since:
- jcms-4.1
-
updateGroupSet
public void updateGroupSet(Group grp, boolean add)
Update the groupSet index- Parameters:
grp
- the group to be added or removedadd
- add if true, remove if false- Since:
- jcms-5.0.1
-
getAdministrators
public java.util.ArrayList<Member> getAdministrators()
Retrieve administrators of this workspace (including DBMember).- Returns:
- Returns the administrators.
CAUTION: DO NOT alter the returned List, clone prior modification. - Since:
- jcms-4.1
- See Also:
getAdministrators(boolean)
-
getAdministrators
public java.util.ArrayList<Member> getAdministrators(boolean queryDB)
Retrieve administrators of this workspace.Including or not DBMember.
- Parameters:
queryDB
- whether to query Database to retrieve any DBMember specified as administrators of this workspace- Returns:
- an ArrayList of Members, may return null and may contains null value when queryDB is set to false
- Since:
- JCMS-6331
-
setAdministrators
public void setAdministrators(java.util.ArrayList<Member> administrators)
- Parameters:
administrators
- The administrators to set.- Since:
- jcms-4.1
-
setAdministratorsDBID
public void setAdministratorsDBID(java.util.ArrayList<java.lang.String> dbMbrIds)
Set the ids of DBMember to configure as administrators of this workspace.- Parameters:
dbMbrIds
- an ArrayList of DBMember ids, may be null- Since:
- JCMS-6331
- See Also:
setAdministrators(ArrayList)
-
getAdministratorsDBID
public java.util.ArrayList<java.lang.String> getAdministratorsDBID()
Retrieve the ids of DBMember configured as administrators of this workspace.- Returns:
- an ArrayList of DBMember ids, may be null
- Since:
- JCMS-6331
- See Also:
getAdministrators()
-
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
-
getCatSet
public java.util.HashSet<Category> getCatSet()
- Returns:
- Returns the catSet.
- Since:
- jcms-4.1
-
setCatSet
public void setCatSet(java.util.HashSet<Category> catSet)
- Parameters:
catSet
- The catSet to set.- Since:
- jcms-4.1
-
getTagRoot
public Category getTagRoot()
- Returns:
- the tag root.
- Since:
- jcms-7.1.0
-
setTagRoot
public void setTagRoot(Category tagRoot)
- Parameters:
tagRoot
- the tag root to set.- Since:
- jcms-7.1.0
-
getLanguage
public java.lang.String getLanguage()
- Returns:
- Returns the main Language of the workspace if it is specified. null otherwise.
- Since:
- jcms-5.7.3
-
setLanguage
public void setLanguage(java.lang.String language)
- Parameters:
language
- The language to set.- Since:
- jcms-5.7.3
-
getParent
public Workspace getParent()
- Returns:
- Returns the parent Workspace of the current workspace if it has one. null otherwise.
- Since:
- jcms-7.0.0
-
setParent
public void setParent(Workspace parent)
- Parameters:
parent
- The parent workspace to set.- Since:
- jcms-7.0.0
-
isIncomingMailEnabled
public boolean isIncomingMailEnabled()
- Returns:
- true if the incoming mail is enabled in this Workspace.
- Since:
- jcms-9.0.0
-
setIncomingMailEnabled
public void setIncomingMailEnabled(boolean enable)
- Parameters:
enable
- true to enable the incoming mail in this Workspace.- Since:
- jcms-9.0.0
-
getIncomingMailLocalPart
public java.lang.String getIncomingMailLocalPart()
- Returns:
- the localPart of the incoming E-mail address.
- Since:
- jcms-9.0.0
-
getIncomingMailDefaultLocalPart
public java.lang.String getIncomingMailDefaultLocalPart()
- Returns:
- a default, generated, not already used, incoming Mail LocalPart, built on Workspace's title in its main language.
- Since:
- jcms-9.0.0
-
setIncomingMailLocalPart
public void setIncomingMailLocalPart(java.lang.String localPart)
- Parameters:
localPart
- the incoming Mail Address' localPart to set- Since:
- jcms-9.0.0
-
getIncomingAddress
public java.lang.String getIncomingAddress(Member member)
Computes an incoming e-mail for given Member.
Output is like:
"space_email+mbr_authkey@server.com"
- Parameters:
member
- the member for who generate the E-mail address.- Returns:
- an incoming Email address for this Workspace and Member, or null if incoming mail is disabled.
- Since:
- jcms-9.0.0
- See Also:
MailManager.getIncomingAddress(String, Member, String)
-
getIncomingAddress
public java.lang.String getIncomingAddress(Member member, boolean useLabel)
Computes an incoming e-mail for given Member.
If label is used, output is like:
"Space title <space_email+mbr_authkey@server.com>"
Else, output is like:"space_email+mbr_authkey@server.com"
- Parameters:
member
- the member for who generate the E-mail address.useLabel
- weither to use Workspace title as label.- Returns:
- an incoming Email address for this Workspace and Member, or null if incoming mail is disabled.
- Since:
- jcms-9.0.0
- See Also:
MailManager.getIncomingAddress(String, Member, String)
-
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
-
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
-
performUpdate
public void performUpdate(Member mbr, java.util.Map context)
Description copied from class:Data
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.5.0
- See Also:
Data.performUpdate(com.jalios.jcms.Member, java.util.Map)
-
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
-
getCatSet
public java.util.Set<Category> getCatSet(Member mbr)
Gives the root categories for this Workspace, that the given member may read.- Parameters:
mbr
- the member. May be null.- Returns:
- a sub set of getCatSet()
- Since:
- JCMS-6.1
-
exportXmlRelated
protected void exportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)
- Overrides:
exportXmlRelated
in classData
-
isCollaborativeSpace
public boolean isCollaborativeSpace()
Returns true if this workspace is a CollaborativeSpace (i.e. generated with the Collaborative Spaces Plugin).- Returns:
- true if this workspace is a CollaborativeSpace (i.e. generated with the Collaborative Spaces Plugin).
- Since:
- jcms-6.1.0
-
getCollaborativeSpace
public PortletCollection getCollaborativeSpace()
Returns the CollaborativeSpace associated to this workspace (or null if none).- Returns:
- the CollaborativeSpace associated to this workspace (or null if none).
- Since:
- jcms-10.0.5
-
isFavorite
public boolean isFavorite(Member member)
Returns true if this workspace is a favorite workspace for given Member.- Parameters:
member
- the member- Returns:
- true if this workspace is a favorite workspace for given Member.
- Since:
- jcms-10.0.0
-
getFileSizeMap
public ObjectLongTreeMap getFileSizeMap(boolean refresh)
Returns the map file size for each content-type. To improve the performances, the map is cached unless it is requested to refresh it.This method retrieve the underlying
ObjectLongTreeMap
which is NOT thread safe.
Always synchronize iteration or modification on the returned map.- Parameters:
refresh
- if true refresh the map- Returns:
- the map file size for each content-type.
- Since:
- jcms-7.0.0
-
getPreviousFileAnalyzer
public WorkspaceFileSizeResult getPreviousFileAnalyzer()
returns previousWorkspaceFileSizeResult
instance associated with this workspace if any. This method doesn't do any refresh nor computation like getFileAnalyzer(boolean)- Returns:
- previous
WorkspaceFileSizeResult
instance associated with this workspace if any.
-
getFileAnalyzer
public WorkspaceFileSizeResult getFileAnalyzer(boolean refresh)
returnsWorkspaceFileSizeResult
instance associated with this workspace. Note that as file analyze is down asynchronously, this method should returns null if an analyze is in progress (or if refresh is asked). In this case, user should ask getCurrentAnalyzerThread() to retrieve the analyze thread. getCompleteness() method on the thread can be used to know the state of the thread.- Parameters:
refresh
- force to ignore data previously present in cache- Returns:
WorkspaceFileSizeResult
instance associated with this workspace or null if an analyze is in progress (or if refresh is asked).
-
getCurrentAnalyzerThread
public FileAnalyzerThread getCurrentAnalyzerThread()
Return the current analyzer thread if analyze is in progress- Returns:
- the
FileAnalyzerThread
or null if no analyze is running
-
handleFileAnalyzeEnd
public void handleFileAnalyzeEnd(WorkspaceFileSizeResult fileAnalyzer)
This method is called when global file analyzer has end- Parameters:
fileAnalyzer
- the file analyzer
-
getWfByInstanceMap
public java.util.HashMap<java.lang.Class<?>,java.lang.Boolean> getWfByInstanceMap()
-
setWfByInstanceMap
public void setWfByInstanceMap(java.util.HashMap<java.lang.Class<?>,java.lang.Boolean> wfByInstanceMap)
-
getInstanceWorkflowIdMap
public java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> getInstanceWorkflowIdMap()
-
setInstanceWorkflowIdMap
public void setInstanceWorkflowIdMap(java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> instanceWorkflowIdMap)
-
getInstanceWorkflowGroupMap
public java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> getInstanceWorkflowGroupMap()
-
setInstanceWorkflowGroupMap
public void setInstanceWorkflowGroupMap(java.util.HashMap<java.lang.Class<?>,java.util.Set<java.lang.String>> instanceWorkflowGroupMap)
-
getAlertThreshold
public int getAlertThreshold()
-
setAlertThreshold
public void setAlertThreshold(int alertThreshold)
-
getQuota
public long getQuota()
-
setQuota
public void setQuota(long quota)
-
getLastQuotaNotificationDate
public long getLastQuotaNotificationDate()
-
setLastQuotaNotificationDate
public void setLastQuotaNotificationDate(long lastQuotaNotificationDate)
-
getQuotaAlert
public QuotaElement getQuotaAlert()
-
setQuotaAlert
public void setQuotaAlert(QuotaElement quotaAlert)
-
getUseDefaultQuota
public boolean getUseDefaultQuota()
-
setUseDefaultQuota
public void setUseDefaultQuota(boolean useDefaultQuota)
-
getMainPortal
public PortalInterface getMainPortal()
-
setMainPortal
public void setMainPortal(PortalInterface mainPortal)
-
canBeReadBy
public boolean canBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
Description copied from class:Data
Checks if the specified member is authorized to read this Data.- 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 Data, false otherwise
-
internalCanBeReadBy
protected boolean internalCanBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
-
getOtherWorkspaceContentList
public java.util.List<Content> getOtherWorkspaceContentList(Member mbr, int firstResult, int maxResults)
Returns the list of contents of other workspaces shared in this workspace.- Parameters:
mbr
- the member (to filter according the read rights)firstResult
- the first resultmaxResults
- the max results- Returns:
- the list of contents of other workspaces shared in this workspace.
- Since:
- jcms-10.0.2
-
getSharedContentList
public java.util.List<Content> getSharedContentList(Member mbr, int firstResult, int maxResults)
Returns the list of content of this workspace shared with other workspaces.- Parameters:
mbr
- the member (to filter according the read rights)firstResult
- the first resultmaxResults
- the max results- Returns:
- the list of content of this workspace shared with other workspaces.
- Since:
- jcms-10.0.2
-
getEffectiveClassificationLevel
public int getEffectiveClassificationLevel()
Retrieve the effective classification level of this workspace 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 workspace.- Returns:
- a value from 0 for unclassified workspace to
ClassificationManager.getMaximumLevel()
(included) for highly classified workspace - Since:
- 10.0.8 / JCMS-10746
- See Also:
ClassificationManager
-
setClassificationLevel
public void setClassificationLevel(java.lang.Integer level)
Set the classification level of this workspace.- Parameters:
level
- a value from 0 for unclassified workspace toClassificationManager.getMaximumLevel()
(included) for highly classified workspace. 0 if used if null is specified.- Since:
- 10.0.8 / JCMS-10746
- See Also:
ClassificationManager
-
isClassified
public boolean isClassified()
Check if this workspace is classified.- Returns:
- true if this workspace has a its effective classification level higher than 1 (and classification is enabled), false otherwise
- Since:
- 10.0.8 / JCMS-10746
- See Also:
getEffectiveClassificationLevel()
-
getMinClassificationLevel
public int getMinClassificationLevel()
Retrieve the minimum classification level of publication authorized in this workspace.- Returns:
- a value from 0 to
getClassificationLevel()
(included) - Since:
- 10.0.8 / JCMS-10746
- See Also:
ClassificationManager
-
setMinClassificationLevel
public void setMinClassificationLevel(java.lang.Integer level)
Set the minimum classification level of publication authorized in this workspace.- Parameters:
level
- a value from 0 togetClassificationLevel()
(included)- Since:
- 10.0.8 / JCMS-10746
-
-