Interface ITemplateMechanics

All Superinterfaces:
IAccessMechanics, IBasicMechanics, IClipboardMechanics, IComponent, IContainerMechanics, IInitializable, IMechanics, ISubscribableMechanics, ISystemHandler, IVersionableMechanics, IViewableContainerMechanics, IViewableMechanics

public interface ITemplateMechanics extends IContainerMechanics
Mechanics to manage templates objects
  • Method Details

    • canListWorkspaces

      boolean canListWorkspaces(IThingID templateId, IThingID userId, Map<?,?> capabilities) throws PortalException
      Returns true if the specified user can list the pages base on the specified template.
      Parameters:
      templateId - Template to analyze
      userId - User that requests workspace listing (for filtering)
      capabilities - Optional capabilities map
      Returns:
      True, if the user can list workspaces, False - otherwise
      Throws:
      PortalException
    • checkListWorkspaces

      void checkListWorkspaces(IThingID templateId, IThingID userId, Map<?,?> capabilities) throws PortalException, PortalAccessException
      Throws a PortalAccessException if the specified user cannot list the pages based on the specified template.
      Parameters:
      templateId - Template to analyze
      userId - User that requests workspace listing (for filtering)
      capabilities - Optional capabilities map
      Throws:
      PortalException - if operation fails (except access)
      PortalAccessException - if user cannot list workspace because of access rights
    • listWorkspaces

      IListView<IView> listWorkspaces(IThingID templateId, int start, int end) throws PortalException
      Returns a list of the specified length (or less) from the specified start index in the specified template.
      Parameters:
      templateId - Template whose pages to list.
      start - List starting index (0 for first item).
      end - List length (<1 for all items).
      Returns:
      List of IView items, or an empty list.
      Throws:
      PortalException - if operation fails