public class TypeManagerImpl extends java.lang.Object implements TypeManager
TypeManager
.INO_DAV_PATH
Constructor and Description |
---|
TypeManagerImpl(Connection connection,
java.util.Locale locale)
Creates a TypeManager by using provided Connection and Locale.
|
Modifier and Type | Method and Description |
---|---|
AssociationType |
createAssociationType(java.lang.String value,
java.lang.String name,
java.lang.String forwardLabel,
java.lang.String backwardLabel,
java.util.Locale locale)
Create a new AssociationType.
|
ClassificationAttributeDescription |
createClassificationAttribute(java.lang.String name,
java.lang.String description,
java.lang.String taxonomy)
Creates classification attribute metadata with the provided name,
description and taxonomy.
|
FileAttributeDescription |
createFileAttribute(java.lang.String name,
java.lang.String description)
Creates file attribute metadata with the provided name, description and
dataType.
|
Profile |
createProfile(java.lang.String name)
Creates profile with the provided name.
|
RelationshipAttributeDescription |
createRelationshipAttribute(java.lang.String name,
java.lang.String description,
java.lang.String associationType,
java.util.Collection<java.lang.String> targetObjectTypes)
Creates relationship attribute metadata with the provided name,
description, association type and target object types.
|
RelationshipAttributeDescription |
createRelationshipAttribute(java.lang.String name,
java.lang.String description,
java.lang.String associationType,
java.lang.String... targetObjectTypes)
Creates relationship attribute metadata with the provided name,
description, association type and target object type or types.
|
SlotAttributeDescription |
createSlotAttribute(java.lang.String name,
java.lang.String description,
java.lang.String dataType)
Creates slot attribute metadata with the provided name, description and
dataType.
|
TypeDescription |
createType(java.lang.String displayName,
java.lang.String description,
java.lang.String name,
java.lang.String nameSpace)
Creates an object type using the provided parameters.
|
void |
deleteAsssociationType(AssociationType at)
Delete the given AssociationType.
|
void |
deleteProfile(Profile profile)
Deletes the given profile from the registry.
|
void |
deleteType(TypeDescription typeDesc)
Deletes the given object type.
|
java.util.Collection<AssociationType> |
getAllAssociationTypes()
Get all available AssociationTypes.
|
java.util.Collection<TypeDescription> |
getAllTypes()
Retrieves all object types from the registry.
|
AssociationType |
getAssociationType(java.lang.String value)
Get the AssociationType with the given value.
|
java.util.Collection<AssociationType> |
getAssociationTypeByForwardLabel(java.lang.String label)
Get the AssociationType with the given forward label.
|
AssociationType |
getAssociationTypeByName(java.lang.String name)
Get the AssociationType with the given name.
|
java.util.List<Profile> |
getMandatoryProfiles()
Retrieves the list of mandatory profiles (Permissions, Object-Specific
properties etc.).
|
Profile |
getProfile(java.lang.String key)
Retrieves the profile with the given key.
|
TypeDescription |
getType(java.lang.String name)
Retrieves the object type which matches the given name.
|
void |
saveAssociationType(AssociationType at)
Save the given AssociationType.
|
void |
saveProfile(Profile profile)
Saves the given profile to the registry.
|
void |
saveType(TypeDescription typeDesc)
Saves the given object type.
|
public TypeManagerImpl(Connection connection, java.util.Locale locale) throws CSAppFrameworkException
connection
- the JAXR connection.locale
- the current locale.CSAppFrameworkException
- if an internal error occurs.public TypeDescription createType(java.lang.String displayName, java.lang.String description, java.lang.String name, java.lang.String nameSpace) throws CSAppFrameworkException
createType
in interface TypeManager
displayName
- Display name of the new type.description
- Type description.name
- Type name. This is the local part of the fully qualified type
name - {uri}local-name.nameSpace
- Name space that this type belongs to.CSAppFrameworkException
- if an internal error occurs.public void deleteType(TypeDescription typeDesc) throws CSAppFrameworkException
deleteType
in interface TypeManager
typeDesc
- the given object type.CSAppFrameworkException
- if an internal error occurs.public java.util.Collection<TypeDescription> getAllTypes() throws CSAppFrameworkException
getAllTypes
in interface TypeManager
CSAppFrameworkException
- if an internal error occurs.public TypeDescription getType(java.lang.String name) throws CSAppFrameworkException
getType
in interface TypeManager
name
- the object type name as {uri}local-nameCSAppFrameworkException
- if an internal error occurs.public void saveType(TypeDescription typeDesc) throws CSAppFrameworkException
saveType
in interface TypeManager
typeDesc
- The type description to be saved.CSAppFrameworkException
- if an internal error occurs.public ClassificationAttributeDescription createClassificationAttribute(java.lang.String name, java.lang.String description, java.lang.String taxonomy) throws CSAppFrameworkException
createClassificationAttribute
in interface TypeManager
name
- the attribute name.description
- the attribute description.taxonomy
- Key of the taxonomy that will be used when classifying with
this attribute.CSAppFrameworkException
- if an internal error occurs.public FileAttributeDescription createFileAttribute(java.lang.String name, java.lang.String description) throws CSAppFrameworkException
createFileAttribute
in interface TypeManager
name
- the attribute name.description
- the attribute description.CSAppFrameworkException
- if an internal error occurs.public SlotAttributeDescription createSlotAttribute(java.lang.String name, java.lang.String description, java.lang.String dataType) throws CSAppFrameworkException
createSlotAttribute
in interface TypeManager
name
- the slot namedescription
- the slot description.dataType
- i.e. xs:date, xs:durationCSAppFrameworkException
- if an internal error occurs.public Profile createProfile(java.lang.String name) throws CSAppFrameworkException
createProfile
in interface TypeManager
name
- profile nameCSAppFrameworkException
- if an internal error occurs.public void deleteProfile(Profile profile) throws CSAppFrameworkException
deleteProfile
in interface TypeManager
profile
- the profile from the registry.CSAppFrameworkException
- if an internal error occurs.public void saveProfile(Profile profile) throws CSAppFrameworkException
saveProfile
in interface TypeManager
profile
- the profile to the registry.CSAppFrameworkException
- if an internal error occurs.public Profile getProfile(java.lang.String key) throws CSAppFrameworkException
getProfile
in interface TypeManager
key
- the profile with the given key.CSAppFrameworkException
- if an internal error occurs.public java.util.List<Profile> getMandatoryProfiles() throws CSAppFrameworkException
TypeManager
getMandatoryProfiles
in interface TypeManager
CSAppFrameworkException
- if an internal error occurs.public RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name, java.lang.String description, java.lang.String associationType, java.lang.String... targetObjectTypes) throws CSAppFrameworkException
TypeManager
createRelationshipAttribute
in interface TypeManager
name
- the attribute name.description
- the attribute descriptionassociationType
- Association type that will be used when associating with this
attribute. This is the path to the association type concept.targetObjectTypes
- Keys of the object types to be used for the targets of the
relationship.CSAppFrameworkException
- if an internal error occurs.public RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name, java.lang.String description, java.lang.String associationType, java.util.Collection<java.lang.String> targetObjectTypes) throws CSAppFrameworkException
TypeManager
createRelationshipAttribute
in interface TypeManager
name
- the attribute name.description
- the attribute description.associationType
- Association type that will be used when associating with this
attribute. This is the path to the association type concept.
The path has the following structure: "/uddi:key/ConceptName".targetObjectTypes
- Collection of keys of the object types to be used for the targets of the
relationship.CSAppFrameworkException
- if an internal error occurs.public AssociationType createAssociationType(java.lang.String value, java.lang.String name, java.lang.String forwardLabel, java.lang.String backwardLabel, java.util.Locale locale) throws CSAppFrameworkException
TypeManager
createAssociationType
in interface TypeManager
value
- the value. Must not be null.name
- the name. If null, the name will be equal to the value.forwardLabel
- the forward label. Must not be null.backwardLabel
- the backward label. May be null.locale
- the locale for the name and the labels. If null, the locale of the underlying JAXR connection will be used.CSAppFrameworkException
- if an internal error occurs.public void saveAssociationType(AssociationType at) throws CSAppFrameworkException
TypeManager
saveAssociationType
in interface TypeManager
at
- the AssociationType to be savedCSAppFrameworkException
- if an internal error occurs.public void deleteAsssociationType(AssociationType at) throws CSAppFrameworkException
TypeManager
deleteAsssociationType
in interface TypeManager
at
- the AssociationType to be deletedCSAppFrameworkException
- if an internal error occurs.public AssociationType getAssociationType(java.lang.String value) throws CSAppFrameworkException
TypeManager
getAssociationType
in interface TypeManager
value
- the value of the desired AssociationTypeCSAppFrameworkException
- if an internal error occurs.public AssociationType getAssociationTypeByName(java.lang.String name) throws CSAppFrameworkException
TypeManager
getAssociationTypeByName
in interface TypeManager
name
- the name of the desired AssociationTypeCSAppFrameworkException
- if an internal error occurs.public java.util.Collection<AssociationType> getAssociationTypeByForwardLabel(java.lang.String label) throws CSAppFrameworkException
TypeManager
getAssociationTypeByForwardLabel
in interface TypeManager
label
- the forward labelCSAppFrameworkException
- if an internal error occurs.public java.util.Collection<AssociationType> getAllAssociationTypes() throws CSAppFrameworkException
TypeManager
getAllAssociationTypes
in interface TypeManager
CSAppFrameworkException
- if an internal error occurs.