Interface IContentObject

  • All Superinterfaces:
    org.eclipse.core.runtime.IAdaptable, ch.ivyteam.ivy.cm.IContentManagementEntity

    public interface IContentObject
    extends ch.ivyteam.ivy.cm.IContentManagementEntity
    Content Object
    API:
    This is a public API.
    • Method Detail

      • getName

        String getName()
        Gets the name
        Returns:
        name
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getUri

        String getUri()
        Gets the uri
        Returns:
        uri
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getParent

        IContentObject getParent()
        Gets the parent content object
        Returns:
        parent content object of this content object; null if this content object is already the root of the CMS
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getContentObjectType

        IContentObjectType getContentObjectType()
        Gets the content object type of this ContentObject.
        Returns:
        content object type
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • hasChildren

        boolean hasChildren()
        Checks, if this content object has any child objects. Clients can assume that this method is optimized compared to a check with getChildren().size() > 0.
        Returns:
        true, if content object has children
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getChildren

        List<IContentObject> getChildren()
        Gets all children of this content object sorted by the visual order
        Returns:
        List with all children
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getChild

        IContentObject getChild​(String name)
        Get the child with the given name.
        Parameters:
        name - the name of the child to retrieve
        Returns:
        child with the given name or null if name does not exist
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • addChild

        IContentObject addChild​(String name,
                                CoType type)
        Creates a child ContentObject for this ContentObject. If a visual order is to be provided, it should be set using the returned instance.
        Parameters:
        name - the name of the child to create
        type - type of the child to create
        Returns:
        a new ContentObject instance
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • hasValues

        boolean hasValues()
        Checks if this content object has any values.
        Returns:
        true, if values are present, false otherwise
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getValues

        List<IContentObjectValue> getValues()
        Gets all values of this content object.
        Returns:
        List with all values
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • addValue

        IContentObjectValue addValue​(Locale language)
        Creates a new value for this ContentObject without any content. Content can be set on the returned ContentObjectValue.
        Parameters:
        language - the language of the value, if null: use default language of cms
        Returns:
        the created value
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • delete

        void delete()
        Deletes this content object and all its children and children's children
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • touch

        void touch()
        Update the "last changed by" date to current time and given user.
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.
      • isValid

        boolean isValid()
        Returns true if the entry is valid. False, if the entry is invalid and should no longer be used. E.g. the entry was deleted and this instance should no longer be used.
        Returns:
        True if the entry is valid. False, if the entry is invalid.
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.