Interface Type

    • Method Detail

      • getID

        UUID getID()
        Returns the unique identifier (UUID) of the element.
        Specified by:
        getID in interface IdentifiableElement
        Returns:
        The UUID of the element.
      • setID

        void setID​(UUID uuid)
        Sets the unique identifier (UUID) for the element.
        Specified by:
        setID in interface IdentifiableElement
        Parameters:
        uuid - The UUID to set.
      • getMetadata

        Metadata getMetadata()
        Returns the metadata associated with the element.

        The metadata is included in JSON serialization only if it is not null.

        Specified by:
        getMetadata in interface IdentifiableElement
        Returns:
        The Metadata of the element, or null if none is set.
      • getName

        String getName()
        Returns the name of the type.
        Returns:
        The type name.
      • getDescription

        String getDescription()
        Returns the description of the type.
        Returns:
        The type description.
      • getVersion

        Version getVersion()
        Returns the version of the type.
        Returns:
        The type version.
      • getVersionAsString

        String getVersionAsString()
        Returns the version of the type as a string.
        Returns:
        The version string.
      • getChangelog

        Map<Version,​String> getChangelog()
        Returns the changelog for this type.
        Returns:
        A map of versions to change descriptions.
      • getChangelogWithVersionAsString

        Map<String,​String> getChangelogWithVersionAsString()
        Returns the changelog with versions represented as strings.
        Returns:
        A map of version strings to change descriptions.
      • isAbstract

        boolean isAbstract()
        Checks if the type is abstract.
        Returns:
        true if the type is abstract, false otherwise.
      • isFinal

        boolean isFinal()
        Checks if the type is final.
        Returns:
        true if the type is final, false otherwise.
      • isLocked

        boolean isLocked()
        Checks whether this type's own definition is protected from modification and deletion through the Type write API.

        Server-assigned and never accepted from a client: a value submitted in a write payload is silently ignored, exactly as metadata already is, and the response reports the real value. It is true exactly for the types intrinsic to information-system-model itself, and false for every other type, including those contributed by a domain model on the classpath.

        Returns:
        true if the type definition is locked, false otherwise.
      • setLocked

        void setLocked​(boolean locked)
        Sets whether this type's own definition is protected from modification and deletion.
        Parameters:
        locked - true to mark the type definition as locked, false otherwise.
      • getExtendedTypes

        List<String> getExtendedTypes()
        Returns the types that this type extends.

        A List because the order carries meaning: it is the declaration order of the direct parents -- the local precedence order C3 linearization requires -- and it must survive serialization and persistence unchanged. A Set would map to an unordered store and lose it.

        Returns:
        The parent type names, in declaration order.
      • setExtendedTypes

        void setExtendedTypes​(List<String> extendedTypes)
        Sets the types that this type extends, preserving their declaration order.
        Parameters:
        extendedTypes - the parent type names, in declaration order.
      • getProperties

        List<PropertyDefinition> getProperties()
        Returns the properties defined by this type.

        A List because the order carries meaning: properties are read in the order the Java class declares them, which is the intended reading order for anyone looking at the type definition. A Set would map to an unordered store and lose it.

        Returns:
        The PropertyDefinitions, in declaration order.
      • getAccessType

        AccessType getAccessType()
        Returns the AccessType of this type definition.
        Returns:
        The access type.
      • getAdditionalProperties

        Map<String,​Object> getAdditionalProperties()
        Returns the map of any additional, dynamic properties.
        Returns:
        The map of additional properties.
      • setAdditionalProperty

        void setAdditionalProperty​(String name,
                                   Object value)
        Sets an additional dynamic property.
        Parameters:
        name - the property name
        value - the property value