EntitlementUtils.java revision 6d1d235433e402873f33b933020f25c11aa2b9ab
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014 ForgeRock AS.
*/
/**
* Utility methods for managing entitlements.
*/
public final class EntitlementUtils {
private EntitlementUtils() {
}
/**
* Constructs an {@link ApplicationType} object based on the provided information.
*
* @param name The name of the application type.
* @param data The configuration settings for the application type.
* @return An {@link ApplicationType} object corresponding to the provided details.
* @throws InstantiationException If the class settings cannot be instantiated.
* @throws IllegalAccessException If the class settings cannot be instantiated.
*/
throws InstantiationException, IllegalAccessException {
if (applicationClassName != null) {
}
return appType;
}
/**
* Constructs an {@link Application} object based on the provided information.
*
* @param applicationType The application's type.
* @param realm The realm where the application is defined.
* @param name The name of the application.
* @param data The configuration settings for the application.
* @return An {@link Application} object corresponding to the provided details.
* @throws InstantiationException If the class settings cannot be instantiated.
* @throws IllegalAccessException If the class settings cannot be instantiated.
* @throws EntitlementException If the application class cannot be instantiated.
*/
public static Application createApplication(ApplicationType applicationType, String realm, String name,
}
}
if (description != null) {
}
if (conditionClassNames != null) {
}
if (subjectClassNames != null) {
}
}
if (searchIndex != null) {
}
}
if (attributeNames != null) {
}
}
return app;
}
/**
* Converts the map of actions into a set format where the map's key->value combinations are separated by an equals
* character.
*
* @param actions The map of actions that needs to be converted.
* @return The set of actions in key=value format.
*/
}
}
return set;
}
/**
* Converts the set of actions in key=value format to an actual map.
*
* @param data The set of actions that needs to be converted.
* @return The map of actions after the conversion.
*/
if (index != -1) {
}
}
}
return results;
}
/**
* Returns the first attribute value for the corresponding attributeName in the data map.
*
* @param data The map where the attribute should be retrieved from.
* @param attributeName The name of the attribute that should be retrieved from the map.
* @return The attribute from the map corresponding to the provided attribute name, or <code>null</code> if no such
* attribute is present in the map.
*/
}
/**
* Returns an admin SSO token for administrative actions.
*
* @return An administrative SSO token.
*/
public static SSOToken getAdminToken() {
}
return null;
}
try {
} catch (ClassNotFoundException ex) {
}
return DenyOverride.class;
}
}