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 Details

  • Constructor Details

  • 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 context
      source - the structure id of the resource for which we want the relation targets
      additionalIds - the structure ids of additional resources to include with the relation targets
      cancelIfChanged - 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 context
      source - the structure id of the resource for which we want the relation targets
      additionalIds - the structure ids of additional resources to include with the relation targets
      cancelIfChanged - 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
      org.opencms.gwt.CmsDefaultResourceStatusProvider.TooManyRelationsException - if too many relations are found
    • getFormatterInfo

      Gets the additional information related to the formatter.
      Parameters:
      cms - the CMS context
      bean - 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 CmsException
      Collects all the data to display in the resource status dialog.

      Parameters:
      request - the current request
      cms - the current CMS context
      structureId - the structure id of the resource for which we want the information
      contentLocale - the content locale
      includeTargets - true if relation targets should be included
      detailContentId - the structure id of the detail content if present
      additionalStructureIds - structure ids of additional resources to include with the relation targets
      context - 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 context
      resStatus - the bean in which to sort the relation beans
    • getSiblings

      Gets beans which represents the siblings of a resource.

      Parameters:
      cms - the CMS ccontext
      locale - the locale
      resource - 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 context
      locale - the locale
      resource - the resource for which we want the relation targets
      additionalStructureIds - 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 wrong
      org.opencms.gwt.CmsDefaultResourceStatusProvider.TooManyRelationsException - if too many relations are found