Class CMAResource

    • Constructor Detail

      • CMAResource

        public CMAResource​(CMAType type)
    • Method Detail

      • getSystem

        public CMASystem getSystem()
        Returns:
        the system field.
      • setSystem

        public <T extends CMAResource> T setSystem​(CMASystem system)
        Sets the system field.
        Type Parameters:
        T - resource type to be returned.
        Parameters:
        system - sets the system property.
        Returns:
        this, as casted to a resource, for the ease of chaining.
      • getId

        public java.lang.String getId()
        Returns:
        the sys.id value, null if it is does not exist.
      • setId

        public <T extends CMAResource> T setId​(java.lang.String id)
        Sets the ID for this CMAResource.
        Type Parameters:
        T - resource type to be returned.
        Parameters:
        id - to be set.
        Returns:
        this CMAResource instance.
      • getVersion

        public java.lang.Integer getVersion()
        Returns:
        the sys.version value, null if it does not exist.
      • getVisibility

        public CMAVisibility getVisibility()
        Returns:
        the sys.visibility value, null if it does not exist.
      • setVersion

        public <T extends CMAResource> T setVersion​(java.lang.Integer version)
        Convenience method for setting a version.
        Type Parameters:
        T - the type of the CMAResource calling.
        Parameters:
        version - the version number to be set.
        Returns:
        the calling CMAResource for chaining.
      • setVisibility

        public <T extends CMAResource> T setVisibility​(CMAVisibility visibility)
        Convenience method for setting a version.
        Parameters:
        visibility - the visibility to be set.
        Returns:
        the calling CMAResource for chaining.
      • getSpaceId

        public java.lang.String getSpaceId()
        Returns:
        the ID of the Space associated with this resource, null if it does not exist.
      • setSpaceId

        public <T extends CMAResource> T setSpaceId​(java.lang.String spaceId)
        Convenience method for setting a space id.
        Type Parameters:
        T - An implementation of CMAResource, normally used for chaining setter methods.
        Parameters:
        spaceId - the id to be set.
        Returns:
        the calling CMAResource for chaining.
      • getEnvironmentId

        public java.lang.String getEnvironmentId()
        Returns:
        the ID of the Environment associated with this resource, Constants.DEFAULT_ENVIRONMENT if it does not exist.
      • setEnvironmentId

        public <T extends CMAResource> T setEnvironmentId​(java.lang.String environmentId)
        Convenience method for setting an environment id.
        Type Parameters:
        T - An implementation of CMAResource, normally used for chaining setter methods.
        Parameters:
        environmentId - the id to be set.
        Returns:
        the calling CMAResource for chaining.
      • isArchived

        public java.lang.Boolean isArchived()
        Returns:
        true if this resource is archived.
      • isPublished

        public java.lang.Boolean isPublished()
        Returns:
        true if this resource is published.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a human readable string, representing the object.