Class OrganizationalChartSettingService

java.lang.Object
io.meeds.social.organizationalchart.service.OrganizationalChartSettingService

@Service public class OrganizationalChartSettingService extends Object
Saves the settings of an organizational chart application: the user the chart is centered on and whether its header title is displayed. The settings are read by the application's portlet when it renders.
  • Field Details

  • Constructor Details

    • OrganizationalChartSettingService

      public OrganizationalChartSettingService()
  • Method Details

    • saveSettings

      public void saveSettings(String applicationId, String centerUser, boolean hasHeaderTitle, String username) throws IllegalAccessException
      Parameters:
      applicationId - the id of the organizational chart application
      centerUser - the identity id of the user the chart is centered on, or CONNECTED_USER, or null to keep the saved one
      hasHeaderTitle - whether the header title is displayed
      username - the user who saves the settings
      Throws:
      IllegalAccessException - when the user isn't an administrator
      IllegalArgumentException - when the application id or the center user is invalid
    • canEdit

      public boolean canEdit(String username)
      Parameters:
      username - the user to check
      Returns:
      true when the user can edit the settings and the header title of the organizational chart applications