Interface IFolderMechanics

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

public interface IFolderMechanics extends IContainerMechanics

Mechanics specific to resources of type IFolder. No new methods are defined, but custom behaviour is overriden from the IContainerMechanics and the IBasicMechanics.

  • Method Details

    • canChangeColumns

      boolean canChangeColumns(IThingID folderId, IThingID userId, Map<?,?> capabilities) throws PortalException
      Returns true if the specified user can change the column layout of the specified page.
      Throws:
      PortalException
    • checkChangeColumns

      void checkChangeColumns(IThingID folderId, IThingID userId, Map<?,?> capabilities) throws PortalException, PortalAccessException
      Throws a PortalAccessException if the specified user cannot change the column layout of the specified page.
      Throws:
      PortalException
      PortalAccessException
    • canMovePortlet

      boolean canMovePortlet(IThingID folderId, IThingID userId, IThingID portletId, Map<?,?> capabilities) throws PortalException
      Returns true if the specified user can move the specified portlet in the specified page.
      Throws:
      PortalException
    • checkMovePortlet

      void checkMovePortlet(IThingID folderId, IThingID userId, IThingID portletId, Map<?,?> capabilities) throws PortalException, PortalAccessException
      Throws a PortalAccessException if the specified user cannot move the specified portlet in the specified page.
      Throws:
      PortalException
      PortalAccessException
    • canMinimizePortlet

      boolean canMinimizePortlet(IThingID folderId, IThingID userId, IThingID portletId, Map<?,?> capabilities) throws PortalException
      Returns true if the specified user can minimize the specified portlet.
      Throws:
      PortalException
    • checkMinimizePortlet

      void checkMinimizePortlet(IThingID folderId, IThingID userId, IThingID portletId, Map<?,?> capabilities) throws PortalException, PortalAccessException
      Throws a PortalAccessException if the specified user cannot minimize the specified portlet.
      Throws:
      PortalException
      PortalAccessException
    • handlePortletBeansExpiration

      void handlePortletBeansExpiration(IThingID folderID) throws PortalException
      Handles portlet bean expiration for a given folderID
      Parameters:
      folderID -
      Throws:
      PortalException
    • fireModifyLayoutEvent

      void fireModifyLayoutEvent(IThingID itemId, IThingID userId, int status) throws PortalException
      Fires a page layout modified event.
      Parameters:
      itemId - Page which changed.
      userId - User who made the change.
      status - Status of the event (successful, denied, error).
      Throws:
      PortalException - if the userId is invalid.
    • fireChangeColumnsEvent

      void fireChangeColumnsEvent(IThingID itemId, IThingID userId, int status, ColumnLocation[][] columns) throws PortalException
      Fires a page column layout changed event.
      Parameters:
      itemId - Page which changed.
      userId - User who made the change.
      status - Status of the event (successful, denied, error).
      columns - New column layout.
      Throws:
      PortalException - if the userId is invalid.
    • fireMovePortletsEvent

      void fireMovePortletsEvent(IThingID itemId, IThingID userId, int status, PortletLocation[] deltaLocations) throws PortalException
      Fires a page portlets moved changed event.
      Parameters:
      itemId - Page which changed.
      userId - User who made the change.
      status - Status of the event (successful, denied, error).
      deltaLocations - Changed portlet locations.
      Throws:
      PortalException - if the userId is invalid.
    • fireMinimizePortletEvent

      void fireMinimizePortletEvent(IThingID itemId, IThingID userId, int status, IThingID portletId) throws PortalException
      Fires a portlet minimized event.
      Parameters:
      itemId - Page which changed.
      userId - User who made the change.
      status - Status of the event (successful, denied, error).
      portletId - Portlet changed.
      Throws:
      PortalException - if the userId is invalid.
    • changeColumns

      @Deprecated void changeColumns(IThingID folderId, IThingID userId, ColumnLocation[][] columns) throws PortalException
      Changes the column structure. Moves portlets from old columns (one-by-one, first-to-last) to new columns, based on the first attribute of the old column to match any attribute in a new column (first-to-last). For example, if the current column attributes are the following:
      col 1: thin, left, one
      col 2: thick, center, two
      col 3: thin, right, three
      and the new column attributes are the following:
      col 1: thick, left, one
      col 2: thin, right, two
      portlets from the old col 1 would be placed into the new col 2 (since old col 1 attr 'thin' matches new col 2), portlets from the old col 2 would be placed in the new col 1 (since old col 2 attr 'thick' matches new col 1), and then portlets from the old col 3 would be placed into new col 2 below the portlets from the old col 1 (since old col 3 attr 'thin' matches the new col 2).
      Parameters:
      folderId - Page to modify.
      userId - User for which to modify.
      columns - New column layout. Do not include PortletData!
      Throws:
      PortalException
    • movePortlets

      @Deprecated void movePortlets(IThingID folderId, IThingID userId, PortletLocation[] deltaLocations) throws PortalException
      Moves the specified portlets to the specified new locations, in sequence. When one portlet is moved, all portlets in the column below its old location move up one cell; all portlets at or below its new location move down one cell. If the portlet's specified column does not exist, the portlet is removed from the layout (it will still appear on the page when rendered, but its location is dependant on the particular rendering implementation). If the portlet's specified row does not exist, it is appended to the bottom of its specified column.
      For example, if the current layout is the following:
      col 1 col 2
      ----- -----
      plt 1 plt 4
      plt 2 plt 5
      plt 3 plt 6
      and the deltaLocations are the following:
      [plt 4, 1, 1, 1], [plt 1, 6, 2, 1], [plt 1, 3, 2, 2]
      the resulting layout would be the following:
      col 1 col 2
      ----- -----
      plt 4 plt 5
      plt 6 plt 3
      plt 1
      plt 2
      The same layout would result if the deltaLocations had been (carlessly) specified as the following:
      [plt 6, 1, 1, 1], [plt 4, 1, 1, 1], [plt 1, 3, 2, 3]
      Parameters:
      folderId - Page to modify.
      userId - User for which to modify.
      deltaLocations - Sequence of portlet movement.
      Throws:
      PortalException
    • minimizePortlet

      @Deprecated void minimizePortlet(IThingID folderId, IThingID userId, IThingID portletId, boolean minimize) throws PortalException
      Deprecated.
      Minimizes or un-minimizes the specified portlet.
      Parameters:
      minimize - True to minimize, false to un-minimize.
      Throws:
      PortalException
    • listPortlets

      IThingIDList listPortlets(IThingID folderId, IThingID userId) throws PortalException
      Lists the all the portlets on the specified page viewable by the specified user.
      Throws:
      PortalException
    • listHoboPortlets

      IThingIDList listHoboPortlets(IThingID folderId, IThingID userId) throws PortalException
      Lists the all the portlets on the specified page viewable by the specified user -- but not yet specified in the page layout.
      Throws:
      PortalException
    • getPageData

      PageData getPageData(IThingID folderId, IThingID userId) throws PortalException
      Builds PageData structure for specified folder. If folder has no page info, returns null.
      Throws:
      PortalException
    • setPageData

      void setPageData(IThingID folderId, IThingID userId, PageData page) throws PortalException
      Persists PageData structure for specified folder.
      Throws:
      PortalException
    • personalizePageData

      void personalizePageData(IThingID folderId, IThingID userId, PageData page) throws PortalException
      Filter page data through acls, etc.
      Throws:
      PortalException