|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeManager
Interface for working with registry object types and association types. Provides create/read/update/delete operations on types and their attributes.
The StandaloneRegistryProvider instance must be created with browserBahaviour flag set to <code>true</code>: RegistryProvider registryProvider = new StandaloneRegistryProvider("username", "password", true); SessionContext sessionContext = SessionContext.createInstance(registryProvider); TypeManager typeManager = sessionContext.getTypeManager(); TypeDescription type = typeManager.createType("My Type", "Sample Type", "MyType", "http://csaf.sample"); type.setExtensible(true); type.setIconUrl("http://sample.icons/MyType.gif"); AttributeDescription stringAttribute = typeManager.createSlotAttribute("SlotAttribute", "String attribute", "xs:string") stringAttribute.setMinOccurs(AttributeDescription.MINOCCURS_1); stringAttribute.setMaxOccurs(AttributeDescription.MAXOCCURS_UNBOUNDED); stringAttribute.setDefaultValue("default"); type.addAttribute(stringAttribute); Profile profile = typeManager.createProfile("My Profile"); profile.addAttribute(stringAttribute); type.addProfile(profile); typeManager.saveType(type);
TypeDescription
,
AttributeDescription
Field Summary | |
---|---|
static java.lang.String |
INO_DAV_PATH
The Ino dav path needed to create the repository URL |
Method Summary | |
---|---|
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. |
Field Detail |
---|
static final java.lang.String INO_DAV_PATH
Method Detail |
---|
TypeDescription createType(java.lang.String displayName, java.lang.String description, java.lang.String name, java.lang.String namespace) throws CSAppFrameworkException
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
void saveType(TypeDescription typeDesc) throws CSAppFrameworkException
typeDesc
- The type description to be saved.
CSAppFrameworkException
TypeDescription getType(java.lang.String name) throws CSAppFrameworkException
name
- the object type name as {uri}local-name
CSAppFrameworkException
void deleteType(TypeDescription typeDesc) throws CSAppFrameworkException
typeDesc
-
CSAppFrameworkException
java.util.Collection<TypeDescription> getAllTypes() throws CSAppFrameworkException
CSAppFrameworkException
SlotAttributeDescription createSlotAttribute(java.lang.String name, java.lang.String description, java.lang.String dataType) throws CSAppFrameworkException
name
- description
- dataType
- i.e. xs:date, xs:duration
CSAppFrameworkException
FileAttributeDescription createFileAttribute(java.lang.String name, java.lang.String description) throws CSAppFrameworkException
name
- description
-
CSAppFrameworkException
ClassificationAttributeDescription createClassificationAttribute(java.lang.String name, java.lang.String description, java.lang.String taxonomy) throws CSAppFrameworkException
name
- description
- taxonomy
- Key of the taxonomy that will be used when classifying with
this attribute.
CSAppFrameworkException
RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name, java.lang.String description, java.lang.String associationType, java.util.Collection<java.lang.String> targetObjectTypes) throws CSAppFrameworkException
name
- 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
RelationshipAttributeDescription createRelationshipAttribute(java.lang.String name, java.lang.String description, java.lang.String associationType, java.lang.String... targetObjectTypes) throws CSAppFrameworkException
name
- description
- associationType
- 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
Profile createProfile(java.lang.String name) throws CSAppFrameworkException
name
- profile name
CSAppFrameworkException
void saveProfile(Profile profile) throws CSAppFrameworkException
profile
-
CSAppFrameworkException
void deleteProfile(Profile profile) throws CSAppFrameworkException
profile
-
CSAppFrameworkException
Profile getProfile(java.lang.String key) throws CSAppFrameworkException
key
-
CSAppFrameworkException
java.util.List<Profile> getMandatoryProfiles() throws CSAppFrameworkException
CSAppFrameworkException
AssociationType createAssociationType(java.lang.String value, java.lang.String name, java.lang.String forwardLabel, java.lang.String backwardLabel, java.util.Locale locale) throws CSAppFrameworkException
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
void saveAssociationType(AssociationType at) throws CSAppFrameworkException
at
- the AssociationType to be saved
CSAppFrameworkException
void deleteAsssociationType(AssociationType at) throws CSAppFrameworkException
at
- the AssociationType to be deleted
CSAppFrameworkException
AssociationType getAssociationType(java.lang.String value) throws CSAppFrameworkException
value
- the value of the desired AssociationType
CSAppFrameworkException
AssociationType getAssociationTypeByName(java.lang.String name) throws CSAppFrameworkException
name
- the name of the desired AssociationType
CSAppFrameworkException
java.util.Collection<AssociationType> getAssociationTypeByForwardLabel(java.lang.String label) throws CSAppFrameworkException
label
- the forward label
CSAppFrameworkException
java.util.Collection<AssociationType> getAllAssociationTypes() throws CSAppFrameworkException
CSAppFrameworkException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |