Package com.adobe.granite.cloudsettings
Class CloudSettingsUtil
java.lang.Object
com.adobe.granite.cloudsettings.CloudSettingsUtil
Utility methods utilized in the JSPs to retrieve and process data for displaying the cloudsettings UI
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringJCR Mixin Type used to collect CloudsettingsConfigType candidates via searchstatic final StringProperty 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)static final StringProperty 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 resourceTypestatic final StringProperty on a CloudSettingConfigType Resource to define a unique name for the CloudSettingConfig Resource so that no sibling with the same name can be created -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerforms a search for all available CloudSettingConfigTypes by mixin Type in the system.getCloudSettingsConfigTypes(ResourceResolver resolver, Resource parentResource) Performs a search for available CloudSettingConfigTypes by mixin Type in the system and filters the resulting iterator them withCloudSettingsUtil.CloudSettingsConfigTypeFilterstatic StringgetPersonDisplayName(ResourceResolver resolver, String userId) Extract the output for display.
-
Field Details
-
MIXIN_CLOUDSETTINGS_CONFIG_TYPE
JCR Mixin Type used to collect CloudsettingsConfigType candidates via search- See Also:
-
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
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
Property on a CloudSettingConfigType Resource to define a unique name for the CloudSettingConfig Resource so that no sibling with the same name can be createdImplementing ui has to take care of creating the CloudSettingConfig Resource with this name
- See Also:
-
-
Constructor Details
-
CloudSettingsUtil
public CloudSettingsUtil()
-
-
Method Details
-
getPersonDisplayName
Extract the output for display.- Parameters:
resolver- the resourceResolver for the lookup of profilesuserId- the userId candidate to be processed for displayName detection- Returns:
- detected displayName
-
getAllCloudSettingsConfigTypes
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 withCloudSettingsUtil.CloudSettingsConfigTypeFilter- Parameters:
resolver- the resolver to be used for CloudSettingConfigType searchparentResource- the resource under which the returned CloudSettingConfigType are creatable- Returns:
- filtered Iterator containing the valid CloudSettingsConfigTypes for the given parent
-