public class Type extends TypeDescriptor
Type
represents an object type that is defined in the system and that contains metadata that represents the state
that is maintained by instances of this type. Types are immutable. Therefore, the initialized state is not modifiable. It not
intended for these objects to be constructed. Rather, they should be retrieved using the TypeService
.TypeService.getTypeById(String)
,
TypeService.getTypes()
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
Type.Capability
This enumeration defines the capabilities that are available by each type.
|
Constructor and Description |
---|
Type(String id,
String name,
String description,
boolean contextType,
boolean folderType,
boolean fileType,
List<AttributeDefinition> attributeDefinitions,
List<Type.Capability> capabilities,
List<String> allowableChildTypes,
long revision)
It is not intended or recommended that the consumer of this API construct these objects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<String> |
getAllowableChildTypes()
Gets the list of allowable child types that can be created within the container type.
|
AttributeDefinition |
getAttributeDefinitionById(String id)
Gets the attribute definition with the specified identifier.
|
AttributeDefinition |
getAttributeDefinitionByName(String name)
Gets the attribute definition with the specified name.
|
List<AttributeDefinition> |
getAttributeDefinitions()
Gets the attribute definitions that are related to the object type.
|
List<Type.Capability> |
getCapabilities()
Gets the capabilities that are available with the type definition.
|
long |
getRevision()
Gets the internal revision number of the object.
|
int |
hashCode() |
String |
toString() |
getDescription, getName, isContextType, isFileType, isFolderType
getId, getTypeId
public Type(String id, String name, String description, boolean contextType, boolean folderType, boolean fileType, List<AttributeDefinition> attributeDefinitions, List<Type.Capability> capabilities, List<String> allowableChildTypes, long revision)
id
- the unique identifier of the type.name
- the display name of the type.description
- the description of the type.contextType
- indicates whether the type is a context.folderType
- indicates whether the type is a folder.fileType
- indicates whether the type is a file.attributeDefinitions
- the attribute definitions that define the attributes that can be stored with the
object type.capabilities
- the capabilities that are available with the type definition.allowableChildTypes
- the list of allowable child types that can be created within the container type. The
list is always empty for file types.revision
- the internal revision number of the object.public long getRevision()
public List<AttributeDefinition> getAttributeDefinitions()
public AttributeDefinition getAttributeDefinitionById(String id)
null
when the attribute definition is not
declared on the type or any super type.id
- the identifier of the attribute definition to find.null
, if one does not exist for the type.public AttributeDefinition getAttributeDefinitionByName(String name)
null
when the attribute definition is not
declared on the type or any super type.name
- the name of the attribute definition to find.null
, if one does not exist for the type.public List<Type.Capability> getCapabilities()
public List<String> getAllowableChildTypes()
public int hashCode()
hashCode
in class TypeDescriptor
public boolean equals(Object obj)
equals
in class TypeDescriptor
public String toString()
toString
in class TypeDescriptor
<i>Copyright (c) 2022, SAS Institute Inc., Cary, NC, USA</i>