Package org.opencms.gwt
Class CmsDefaultResourceStatusProvider
java.lang.Object
org.opencms.gwt.CmsDefaultResourceStatusProvider
Helper class to generate all the data which is necessary for the resource status dialog(s).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longMaximum relation count that is still displayed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsRelationTargetListBeangetContainerpageRelationTargets(CmsObject cms, CmsUUID source, List<CmsUUID> additionalIds, boolean cancelIfChanged) Gets the relation targets for a resource.static CmsRelationTargetListBeangetContainerpageRelationTargetsLimited(CmsObject cms, CmsUUID source, List<CmsUUID> additionalIds, boolean cancelIfChanged) Gets the relation targets for a resource.getFormatterInfo(CmsObject cms, I_CmsFormatterBean bean) Gets the additional information related to the formatter.getResourceStatus(javax.servlet.http.HttpServletRequest request, CmsObject cms, CmsUUID structureId, String contentLocale, boolean includeTargets, CmsUUID detailContentId, List<CmsUUID> additionalStructureIds, Map<String, String> context) Collects all the data to display in the resource status dialog.protected List<CmsResourceStatusRelationBean> getSiblings(CmsObject cms, String locale, CmsResource resource) Gets beans which represents the siblings of a resource.protected List<CmsResourceStatusRelationBean> getTargets(CmsObject cms, String locale, CmsResource resource, List<CmsUUID> additionalStructureIds) Gets the list of relation targets for a resource.voidsortRelations(CmsObject cms, CmsResourceStatusBean resStatus) Sorts relation beans from other sites by site order.
-
Field Details
-
MAX_RELATIONS
Maximum relation count that is still displayed.- See Also:
-
-
Constructor Details
-
CmsDefaultResourceStatusProvider
public CmsDefaultResourceStatusProvider()
-
-
Method Details
-
getContainerpageRelationTargets
public static CmsRelationTargetListBean getContainerpageRelationTargets(CmsObject cms, CmsUUID source, 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, 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
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, String contentLocale, boolean includeTargets, CmsUUID detailContentId, List<CmsUUID> additionalStructureIds, Map<String, String> context) throws CmsExceptionCollects 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
-
getSiblings
protected List<CmsResourceStatusRelationBean> getSiblings(CmsObject cms, 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 List<CmsResourceStatusRelationBean> getTargets(CmsObject cms, String locale, CmsResource resource, 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
-