public class UpgradeUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addAttributeDefaultValues(String serviceName,
String subSchemaName,
String schemaType,
String attributeName,
Set defaultValues)
Adds default values to an existing attribute.
|
static void |
addAttributeToSchema(ServiceSchema serviceSchema,
Node attributeSchemaNode)
Adds new attribute schema to an existing service.
|
static void |
addAttributeToSchema(String serviceName,
String subSchemaName,
String schemaType,
Node attributeSchemaNode,
SSOToken adminToken)
Adds new attribute schema to an existing service.
|
static void |
addAttributeToSubSchema(String serviceName,
String subSchemaName,
String schemaType,
String attributeSchemaFile)
Adds new attribute schema to a sub schema in an existing service.
|
static void |
createService(String fileName)
Creates a new service schema in the configuration store.
|
static void |
removeAttributeSchema(ServiceSchema serviceSchema,
String attributeName)
Removes attribute schema from an existing service.
|
static void |
removeAttributeSchema(String serviceName,
String subSchemaName,
String schemaType,
String attributeName,
SSOToken adminToken)
Remove an attribute schema from an existing service.
|
static void |
replaceAttributeSchema(ServiceSchema serviceSchema,
String attributeName,
Node attributeSchemaNode)
Replace an attribute schema from an existing service with the new one
|
static void |
replaceAttributeSchema(String serviceName,
String subSchemaName,
String schemaType,
String attributeName,
SSOToken adminToken,
Node attributeSchemaNode)
Replace an attribute schema from an existing service with the new one
|
static void |
setAttributeDefaultValues(String serviceName,
String subSchemaName,
String schemaType,
String attributeName,
Set defaultValues)
Sets default values of an existing attribute.
|
public static void createService(String fileName) throws UpgradeException
fileName
- Name of the service schema XML to be loaded.UpgradeException
- if there is an error creating a service.public static void addAttributeToSubSchema(String serviceName, String subSchemaName, String schemaType, String attributeSchemaFile) throws UpgradeException
serviceName
- the service name.subSchemaName
- the sub schema name.schemaType
- the schema type.attributeSchemaFile
- XML file containing attribute schema definition.UpgradeException
- if there is an error adding the
attribute schema.public static void setAttributeDefaultValues(String serviceName, String subSchemaName, String schemaType, String attributeName, Set defaultValues) throws UpgradeException
serviceName
- name of the servicesubSchemaName
- name of the subschemaschemaType
- the type of schema.attributeName
- name of the attributedefaultValues
- a set of values to be added to the attributeUpgradeException
- if there is an error.public static void addAttributeDefaultValues(String serviceName, String subSchemaName, String schemaType, String attributeName, Set defaultValues) throws UpgradeException
serviceName
- name of the servicesubSchemaName
- name of the subschemaschemaType
- the schemaTypeattributeName
- name of the attributedefaultValues
- a set of values to be added to the attributeUpgradeException
- If there is an error.public static void addAttributeToSchema(String serviceName, String subSchemaName, String schemaType, Node attributeSchemaNode, SSOToken adminToken) throws UpgradeException
serviceName
- the service name.schemaType
- the schema type.attributeSchemaNode
- attribute to addadminToken
- admin SSOTokenUpgradeException
- if there is an error adding the
attribute schema.public static void addAttributeToSchema(ServiceSchema serviceSchema, Node attributeSchemaNode) throws UpgradeException
serviceSchema
- The underlying service schema.attributeSchemaNode
- The attribute is addUpgradeException
- if there is an error adding the
attribute schema.public static void removeAttributeSchema(String serviceName, String subSchemaName, String schemaType, String attributeName, SSOToken adminToken) throws UpgradeException
serviceName
- the service name.subSchemaName
- name of the subschemaschemaType
- the schema type.attributeName
- attribute to removeadminToken
- admin SSOTokenUpgradeException
- if there is an error removing the
attribute schema.public static void removeAttributeSchema(ServiceSchema serviceSchema, String attributeName) throws UpgradeException
serviceSchema
- The underlying service schema.attributeName
- The attribute is removeUpgradeException
- if there is an error removing the
attribute schema.public static void replaceAttributeSchema(String serviceName, String subSchemaName, String schemaType, String attributeName, SSOToken adminToken, Node attributeSchemaNode) throws UpgradeException
serviceName
- the service name.subSchemaName
- name of the subschemaschemaType
- the schema type.attributeName
- attribute to updateadminToken
- admin SSOTokenattributeSchemaNode
- The attribute to updateUpgradeException
- if there is an error updating the
attribute schema.public static void replaceAttributeSchema(ServiceSchema serviceSchema, String attributeName, Node attributeSchemaNode) throws UpgradeException
serviceSchema
- The underlying service schema.attributeName
- attribute to updateattributeSchemaNode
- The attribute to updateUpgradeException
- if there is an error updating the
attribute schema.Copyright © 2010-2018, ForgeRock All Rights Reserved.