Package com.adobe.granite.cloudsettings
Class CloudSettingsUtil
- java.lang.Object
-
- com.adobe.granite.cloudsettings.CloudSettingsUtil
-
public class CloudSettingsUtil extends java.lang.Object
Utility methods utilized in the JSPs to retrieve and process data for displaying the cloudsettings UI
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MIXIN_CLOUDSETTINGS_CONFIG_TYPE
JCR Mixin Type used to collect CloudsettingsConfigType candidates via searchstatic java.lang.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)static java.lang.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 resourceTypestatic java.lang.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
-
Constructor Summary
Constructors Constructor Description CloudSettingsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Iterator<Resource>
getAllCloudSettingsConfigTypes(ResourceResolver resolver)
Performs a search for all available CloudSettingConfigTypes by mixin Type in the system.static java.util.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
static java.lang.String
getPersonDisplayName(ResourceResolver resolver, java.lang.String userId)
Extract the output for display.
-
-
-
Field Detail
-
MIXIN_CLOUDSETTINGS_CONFIG_TYPE
public static final java.lang.String MIXIN_CLOUDSETTINGS_CONFIG_TYPE
JCR Mixin Type used to collect CloudsettingsConfigType candidates via search- See Also:
- Constant Field Values
-
PROP_ALLOWED_CHILD_TYPES
public static final java.lang.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:
- Constant Field Values
-
PROP_ALLOWED_PARENT_TYPES
public static final java.lang.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:
- Constant Field Values
-
PROP_UNIQUE_NAME
public static final java.lang.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 createdImplementing ui has to take care of creating the CloudSettingConfig Resource with this name
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPersonDisplayName
public static java.lang.String getPersonDisplayName(ResourceResolver resolver, java.lang.String userId)
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
public static java.util.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 java.util.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
-
-