Class Type

  • All Implemented Interfaces:
    Identifiable, java.io.Serializable

    public class Type
    extends TypeDescriptor
    A 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.
    Since:
    1.7
    See Also:
    TypeService.getTypeById(String), TypeService.getTypes(), Serialized Form
    • Constructor Detail

      • Type

        public Type​(java.lang.String id,
                    java.lang.String name,
                    java.lang.String description,
                    boolean contextType,
                    boolean folderType,
                    boolean sharedFolderType,
                    boolean fileType,
                    java.util.List<AttributeDefinition> attributeDefinitions,
                    java.util.List<Type.Capability> capabilities,
                    java.util.List<java.lang.String> allowableChildTypes,
                    long revision)
        It is not intended or recommended that the consumer of this API construct these objects. They should only deal with the type instances returned by the API.
        Parameters:
        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.
        sharedFolderType - indicates whether the type is a shared 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.
    • Method Detail

      • getRevision

        public long getRevision()
        Gets the internal revision number of the object.
        Returns:
        The internal revision number of the object.
      • getAttributeDefinitions

        public java.util.List<AttributeDefinition> getAttributeDefinitions()
        Gets the attribute definitions that are related to the object type. The list includes the system-defined attribute definitions and the user-defined extended attribute definitions.
        Returns:
        The attribute definitions that are related to the object type.
      • getAttributeDefinitionById

        public AttributeDefinition getAttributeDefinitionById​(java.lang.String id)
        Gets the attribute definition with the specified identifier. Returns null when the attribute definition is not declared on the type or any super type.
        Parameters:
        id - the identifier of the attribute definition to find.
        Returns:
        The attribute definition with the specified identifier or null, if one does not exist for the type.
      • getAttributeDefinitionByName

        public AttributeDefinition getAttributeDefinitionByName​(java.lang.String name)
        Gets the attribute definition with the specified name. Returns null when the attribute definition is not declared on the type or any super type.
        Parameters:
        name - the name of the attribute definition to find.
        Returns:
        The attribute definition with the specified name or null, if one does not exist for the type.
      • getCapabilities

        public java.util.List<Type.Capability> getCapabilities()
        Gets the capabilities that are available with the type definition.
        Returns:
        The capabilities that are available with the type definition.
      • getAllowableChildTypes

        public java.util.List<java.lang.String> getAllowableChildTypes()
        Gets the list of allowable child types that can be created within the container type. The list will is always empty for file types.
        Returns:
        The list of allowable child types that can be created within the container type. The list is always empty for file types.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class TypeDescriptor