Interface IClipboardMechanics

All Superinterfaces:
IComponent, IInitializable, IMechanics, ISubscribableMechanics, ISystemHandler, IViewableMechanics
All Known Subinterfaces:
IBasicMechanics, IContainerContentConstraintMechanics, IContainerMechanics, IContentMechanics, IFolderMechanics, ILinkMechanics, ILocalePortletMechanics, IPortalRulesMechanics, IPortletMechanics, IRuleMechanics, IScheduleMechanics, ISkinMechanics, ITaskMechanics, ITaskScheduleMechanics, ITemplateMechanics, ITopicMechanics, IVersionableMechanics, IXTypeMechanics

public interface IClipboardMechanics extends ISubscribableMechanics
Mechanics for portal resources that can be cut or copied to the clipboard.
  • Method Details

    • canCutToClipboard

      boolean canCutToClipboard(IURI itemId, IThingID userId, IURI containerId, boolean isReference) throws PortalException
      Returns true if the specified user can cut the specified item.
      Parameters:
      itemId - IURI of item to cut.
      userId - IThingID of user who wants to cut the item.
      containerId - IURI of container in which the item resides. May be null.
      isReference - True if item is a shortcut rather than an object.
      Returns:
      True if the user can cut the item, False if they can't.
      Throws:
      PortalException - if the userId is invalid.
    • checkCutToClipboard

      void checkCutToClipboard(IURI itemId, IThingID userId, IURI containerId, boolean isReference) throws PortalException, PortalAccessException
      Throws a PortalAccessException if the specified user cannot cut the specified item.
      Parameters:
      itemId - Item to cut.
      userId - User whose access to test.
      containerId - Container from which to cut. May be null.
      isReference - False if the container is the primary container of the item.
      Throws:
      PortalAccessException - if the specified user cannot cut the specified item.
      PortalException - if an error occurred checking access.
    • canCopyToClipboard

      boolean canCopyToClipboard(IURI itemId, IThingID userId, IURI containerId, boolean isReference) throws PortalException
      Returns true if the specified user can copy the specified item.
      Parameters:
      itemId - IURI of item to copy.
      userId - IThingID of user who wants to copy the item.
      containerId - IURI of container in which the item resides. May be null.
      isReference - True if item is a shortcut rather than an object.
      Returns:
      True if the user can copy the item, False if they can't.
      Throws:
      PortalException - if the userId is invalid.
    • checkCopyToClipboard

      void checkCopyToClipboard(IURI itemId, IThingID userId, IURI containerId, boolean isReference) throws PortalException, PortalAccessException
      Throws a PortalAccessException if the specified user cannot copy the specified item.
      Parameters:
      itemId - Item to copy.
      userId - User whose access to test.
      containerId - Container from which to copy. May be null.
      isReference - False if the container is the primary container of the item.
      Throws:
      PortalAccessException - if the specified user cannot copy the specified item.
      PortalException - if an error occurred checking access.
    • cutToClipboard

      void cutToClipboard(IClipboard clipboard, IURI itemId, IURI containerID, boolean isReference) throws PortalException
      Clears the clipboard and adds the item to the clipboard as a cut item.
      Parameters:
      clipboard - User's clipboard object.
      itemId - Item to cut.
      containerID - Container from which to cut. May be null.
      isReference - False if the container is the primary container of the item.
      Throws:
      PortalException - if an error occurred.
    • copyToClipboard

      void copyToClipboard(IClipboard clipboard, IURI itemId, IURI containerID, boolean isReference) throws PortalException
      Clears the clipboard and adds the item to the clipboard as a copied item.
      Parameters:
      clipboard - User's clipboard object.
      itemId - Item to copy.
      containerID - Container from which to copy. May be null.
      isReference - False if the container is the primary container of the item.
      Throws:
      PortalException - if an error occurred.
    • getClipboard

      IClipboard getClipboard(IContext context) throws PortalException
      Retrieves a user's clipboard
      Parameters:
      context -
      Returns:
      Throws:
      PortalException
    • getClipboardInfo

      String getClipboardInfo(IContext context)
      Gets a brief description of the current size
      Parameters:
      context -
    • newClipboardItem

      IClipboardItem newClipboardItem(boolean isReference) throws PortalException
      Creates a new clipboard item
      Parameters:
      isReference -
      Returns:
      Throws:
      PortalException