Class SmartContentClientSideElement

All Implemented Interfaces:
ClientSideElement, LogEnabled, PluginAware, Configurable, Serviceable
Direct Known Subclasses:
ArchiveContentClientSideElement, ContentAlertsClientSideElement, CopyODFContentClientSideElement, DeleteContentClientSideElement, MCCWorkflowClientSideElement, PilotageSmartContentClientSideElement, PilotageStatusButtonClientSideElement, RulesSmartContentClientSideElement, SCCSmartContentClientSideElement, ScheduleArchivingClientSideElement, ScheduleEducationalBookletClientSideElement, ShareableCourseContentClientSideElement, SmartContentMenu

Edit HMI item
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Overrides:
      service in class StaticFileImportsClientSideElement
      Throws:
      ServiceException
    • getStatus

      protected Map<String,Object> getStatus(List<String> contentsId)
      Get informations on contents' state This method should only be used if you need additional information than the default one. Otherwise use the JS implementation provided by SmartContentController._calculateStatus When called inside a Callable, you can consider that this method will do the right check as long as you only do additional processing on the "allright-contents".
      Parameters:
      contentsId - the ids of contents
      Returns:
      informations on contents' state
    • _hasReadAccess

      protected boolean _hasReadAccess(Content content)
      Determine if the current user has access to the content If not, the content should be ignored
      Parameters:
      content - the content
      Returns:
      true if the user has access
    • _isAllRight

      protected boolean _isAllRight(Content content, boolean hasError, Map<String,Object> results)
      Determines if the user can finally do action on content
      Parameters:
      content - The content
      hasError - true if a error has already occurs
      results - The result parameters to be passed to client side
      Returns:
      true if the user can finally do action on content
    • getContentDefaultParameters

      Get the default content's parameters
      Parameters:
      content - The content
      Returns:
      The default parameters
    • _isLocked

      protected boolean _isLocked(Content content)
      Determines if the content is locked
      Parameters:
      content - the content
      Returns:
      true if the content is locked
    • _isModifiable

      protected boolean _isModifiable(Content content)
      Determines if the content is modifiable
      Parameters:
      content - the content
      Returns:
      true if the content is modifiable
    • _hasRight

      protected boolean _hasRight(Content content)
      Determines if the user has sufficient right for the given content
      Parameters:
      content - the content
      Returns:
      true if user has sufficient right
    • _workflowAction

      protected int _workflowAction(Content content)
      Determines if the workflow action is correct
      Parameters:
      content - the content
      Returns:
      true if the workflow action is incorrect
    • _isWorkflowStepCorrect

      protected boolean _isWorkflowStepCorrect(Content content)
      Determines if the workflow step is correct
      Parameters:
      content - the content
      Returns:
      true if the workflow step is incorrect
    • _getNoRightDescription

      Get i18n description when user can not do action because he has no right on content
      Parameters:
      content - The content
      Returns:
      The I18nizableText description
    • _getLockedDescription

      Get i18n description when user can not do action because the content is locked
      Parameters:
      content - The content
      Returns:
      The I18nizableText description
    • _getWorkflowActionUnvailableDescription

      Get i18n description when user can not do action because there is no workflow action unvailable
      Parameters:
      content - The content
      Returns:
      The I18nizableText description
    • _getIncorrectWorkflowStepDescription

      Get i18n description when user can not do action because the workflow step is incorrect
      Parameters:
      content - The content
      Returns:
      The I18nizableText description
    • _getNoModifiableDescription

      Get i18n description when user can not do action because the content is not modifiable
      Parameters:
      content - The content
      Returns:
      The I18nizableText description
    • _getAllRightDescription

      Get i18n description when user can do action
      Parameters:
      content - The content
      Returns:
      The I18nizableText description