Class CloudSettingsUtil

java.lang.Object
com.adobe.granite.cloudsettings.CloudSettingsUtil

public class CloudSettingsUtil extends Object
Utility methods utilized in the JSPs to retrieve and process data for displaying the cloudsettings UI
  • Field Details

    • MIXIN_CLOUDSETTINGS_CONFIG_TYPE

      public static final String MIXIN_CLOUDSETTINGS_CONFIG_TYPE
      JCR Mixin Type used to collect CloudsettingsConfigType candidates via search
      See Also:
    • PROP_ALLOWED_CHILD_TYPES

      public static final String PROP_ALLOWED_CHILD_TYPES
      Property on a CloudSettingConfigType Resource to define to define the resourceTypes that can be used as child for a CloudSettingsConfig with this resourceType (subTypes are allowed as well)
      See Also:
    • PROP_ALLOWED_PARENT_TYPES

      public static final String PROP_ALLOWED_PARENT_TYPES
      Property on a CloudSettingConfigType Resource to define to define the resourceTypes that a parent must have (subTypes are allowed as well) to create a CloudSettingsConfig with this resourceType
      See Also:
    • PROP_UNIQUE_NAME

      public static final String PROP_UNIQUE_NAME
      Property on a CloudSettingConfigType Resource to define a unique name for the CloudSettingConfig Resource so that no sibling with the same name can be created

      Implementing ui has to take care of creating the CloudSettingConfig Resource with this name

      See Also:
  • Constructor Details

    • CloudSettingsUtil

      public CloudSettingsUtil()
  • Method Details

    • getPersonDisplayName

      public static String getPersonDisplayName(ResourceResolver resolver, String userId)
      Extract the output for display.
      Parameters:
      resolver - the resourceResolver for the lookup of profiles
      userId - the userId candidate to be processed for displayName detection
      Returns:
      detected displayName
    • getAllCloudSettingsConfigTypes

      public static Iterator<Resource> getAllCloudSettingsConfigTypes(ResourceResolver resolver)
      Performs a search for all available CloudSettingConfigTypes by mixin Type in the system.
      Parameters:
      resolver - the resolver to be used for CloudSettingConfigType search
      Returns:
      Iterator containing all CloudSettingsConfigTypes for the given parent
    • getCloudSettingsConfigTypes

      public static Iterator<Resource> getCloudSettingsConfigTypes(ResourceResolver resolver, Resource parentResource)
      Performs a search for available CloudSettingConfigTypes by mixin Type in the system and filters the resulting iterator them with CloudSettingsUtil.CloudSettingsConfigTypeFilter
      Parameters:
      resolver - the resolver to be used for CloudSettingConfigType search
      parentResource - the resource under which the returned CloudSettingConfigType are creatable
      Returns:
      filtered Iterator containing the valid CloudSettingsConfigTypes for the given parent