Package org.opencms.gwt
Class CmsDefaultResourceStatusProvider
- java.lang.Object
-
- org.opencms.gwt.CmsDefaultResourceStatusProvider
-
public class CmsDefaultResourceStatusProvider extends java.lang.Object
Helper class to generate all the data which is necessary for the resource status dialog(s).
-
-
Field Summary
Fields Modifier and Type Field Description static long
MAX_RELATIONS
Maximum relation count that is still displayed.
-
Constructor Summary
Constructors Constructor Description CmsDefaultResourceStatusProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmsRelationTargetListBean
getContainerpageRelationTargets(CmsObject cms, CmsUUID source, java.util.List<CmsUUID> additionalIds, boolean cancelIfChanged)
Gets the relation targets for a resource.static CmsRelationTargetListBean
getContainerpageRelationTargetsLimited(CmsObject cms, CmsUUID source, java.util.List<CmsUUID> additionalIds, boolean cancelIfChanged)
Gets the relation targets for a resource.static java.util.Map<java.lang.String,java.lang.String>
getFormatterInfo(CmsObject cms, I_CmsFormatterBean bean)
Gets the additional information related to the formatter.CmsResourceStatusBean
getResourceStatus(javax.servlet.http.HttpServletRequest request, CmsObject cms, CmsUUID structureId, java.lang.String contentLocale, boolean includeTargets, CmsUUID detailContentId, java.util.List<CmsUUID> additionalStructureIds, java.util.Map<java.lang.String,java.lang.String> context)
Collects all the data to display in the resource status dialog.protected java.util.List<CmsResourceStatusRelationBean>
getSiblings(CmsObject cms, java.lang.String locale, CmsResource resource)
Gets beans which represents the siblings of a resource.protected java.util.List<CmsResourceStatusRelationBean>
getTargets(CmsObject cms, java.lang.String locale, CmsResource resource, java.util.List<CmsUUID> additionalStructureIds)
Gets the list of relation targets for a resource.void
sortRelations(CmsObject cms, CmsResourceStatusBean resStatus)
Sorts relation beans from other sites by site order.
-
-
-
Field Detail
-
MAX_RELATIONS
public static final long MAX_RELATIONS
Maximum relation count that is still displayed.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsDefaultResourceStatusProvider
public CmsDefaultResourceStatusProvider()
-
-
Method Detail
-
getContainerpageRelationTargets
public static CmsRelationTargetListBean getContainerpageRelationTargets(CmsObject cms, CmsUUID source, java.util.List<CmsUUID> additionalIds, boolean cancelIfChanged) throws CmsException
Gets the relation targets for a resource.- Parameters:
cms
- the current CMS contextsource
- the structure id of the resource for which we want the relation targetsadditionalIds
- the structure ids of additional resources to include with the relation targetscancelIfChanged
- if this is true, this method will stop immediately if it finds a changed resource among the relation targets- Returns:
- a bean containing a list of relation targets
- Throws:
CmsException
- if something goes wrong
-
getContainerpageRelationTargetsLimited
public static CmsRelationTargetListBean getContainerpageRelationTargetsLimited(CmsObject cms, CmsUUID source, java.util.List<CmsUUID> additionalIds, boolean cancelIfChanged) throws CmsException, org.opencms.gwt.CmsDefaultResourceStatusProvider.TooManyRelationsException
Gets the relation targets for a resource.- Parameters:
cms
- the current CMS contextsource
- the structure id of the resource for which we want the relation targetsadditionalIds
- the structure ids of additional resources to include with the relation targetscancelIfChanged
- if this is true, this method will stop immediately if it finds a changed resource among the relation targets- Returns:
- a bean containing a list of relation targets
- Throws:
CmsException
- if something goes wrongorg.opencms.gwt.CmsDefaultResourceStatusProvider.TooManyRelationsException
- if too many relations are found
-
getFormatterInfo
public static java.util.Map<java.lang.String,java.lang.String> getFormatterInfo(CmsObject cms, I_CmsFormatterBean bean)
Gets the additional information related to the formatter.- Parameters:
cms
- the CMS contextbean
- the formatter bean- Returns:
- the additional information about the formatter
-
getResourceStatus
public CmsResourceStatusBean getResourceStatus(javax.servlet.http.HttpServletRequest request, CmsObject cms, CmsUUID structureId, java.lang.String contentLocale, boolean includeTargets, CmsUUID detailContentId, java.util.List<CmsUUID> additionalStructureIds, java.util.Map<java.lang.String,java.lang.String> context) throws CmsException
Collects all the data to display in the resource status dialog.- Parameters:
request
- the current requestcms
- the current CMS contextstructureId
- the structure id of the resource for which we want the informationcontentLocale
- the content localeincludeTargets
- true if relation targets should be includeddetailContentId
- the structure id of the detail content if presentadditionalStructureIds
- structure ids of additional resources to include with the relation targetscontext
- context parameters used for displaying additional infos- Returns:
- the resource status information
- Throws:
CmsException
- if something goes wrong
-
sortRelations
public void sortRelations(CmsObject cms, CmsResourceStatusBean resStatus)
Sorts relation beans from other sites by site order.- Parameters:
cms
- the current CMS contextresStatus
- the bean in which to sort the relation beans
-
getSiblings
protected java.util.List<CmsResourceStatusRelationBean> getSiblings(CmsObject cms, java.lang.String locale, CmsResource resource) throws CmsException
Gets beans which represents the siblings of a resource.- Parameters:
cms
- the CMS ccontextlocale
- the localeresource
- the resource- Returns:
- the list of sibling beans
- Throws:
CmsException
- if something goes wrong
-
getTargets
protected java.util.List<CmsResourceStatusRelationBean> getTargets(CmsObject cms, java.lang.String locale, CmsResource resource, java.util.List<CmsUUID> additionalStructureIds) throws CmsException, org.opencms.gwt.CmsDefaultResourceStatusProvider.TooManyRelationsException
Gets the list of relation targets for a resource.- Parameters:
cms
- the current CMS contextlocale
- the localeresource
- the resource for which we want the relation targetsadditionalStructureIds
- structure ids of additional resources to include with the relation target- Returns:
- the list of relation beans for the relation targets
- Throws:
CmsException
- if something goes wrongorg.opencms.gwt.CmsDefaultResourceStatusProvider.TooManyRelationsException
- if too many relations are found
-
-