Interface StoreElement

All Superinterfaces:
Comparable<StoreElement>, Workflowable
All Known Subinterfaces:
Allowed, Body, ChannelSourceProvider, Content2, Content2Params, Content2Section, ContentFolder, ContentProducer, ContentStoreRoot, DataProvider, Dataset, DocLink, DocumentGroup, File, FolderLangSpec, FormatTemplate, FormatTemplateChannel, FormatTemplateContainer, FormatTemplateFolder, FormatTemplates, GCABody, GCAFolder, GCAPage, GCASection, GlobalContentArea, GlobalStoreRoot, GomSourceProvider, IDProvider, LanguageInfo, LinkTemplate, LinkTemplates, MasterTemplate, Media, MediaElement, MediaFolder, MediaStoreRoot, PackagePoolItem, Page, PageFolder, PageGroup, PageLangSpec, PageRef, PageRefFolder, PageStoreRoot, PageTemplate, PageTemplates, Picture, PictureResolution, Previewable, PreviewImageProvider, ProjectProperties, Query, Referenceable, Schema, SchemaContainer, SchemaFolder, Schemes, Script, ScriptContainer, ScriptFolder, Scripts, Section<T>, SectionReference<T>, SectionTemplate, SectionTemplates, SiteStoreFolder, SiteStoreRoot, StartNode, Store, StyleTemplate, StyleTemplateLink, TableFormatTemplate, TableTemplate, Template, TemplateBody, TemplateContainer<T>, TemplateContentProvider, TemplateExtension, TemplateFolder<T>, TemplateProvider<T>, TemplateStoreElement, TemplateStoreRoot, URLProperties, UserProperties, Workflow, WorkflowContainer, WorkflowFolder, Workflows

public interface StoreElement extends Workflowable, Comparable<StoreElement>
Since:
2.3
  • Method Details

    • getName

      @ApiDoc(comment="", since="2.3.11") @NotNull @NotNull String getName()
      Since:
      2.3.11
    • getChildren

      @ApiDoc(comment="Get the element\'s direct children.", since="4.0") Listable<StoreElement> getChildren()
      Get the element's direct children.
      Returns:
      A listable on this element's direct children.
      Since:
      4.0
    • getChildren

      @ApiDoc(comment="Get the element\'s direct children that are instances of the given type.", since="4.0") <T extends StoreElement> Listable<T> getChildren(@NotNull @NotNull Class<T> type)
      Get the element's direct children that are instances of the given type.
      Parameters:
      type - The type to find instances of.
      Returns:
      A listable on matching children.
      Since:
      4.0
    • getChildren

      @ApiDoc(comment="Get the element\'s children that are instances of the given type.", since="4.0") <T extends StoreElement> Listable<T> getChildren(@NotNull @NotNull Class<T> type, boolean recurse)
      Get the element's children that are instances of the given type.
      Parameters:
      type - The type to find instances of.
      recurse - If true, recursively collects children.
      Returns:
      A listable on matching children.
      Since:
      4.0
    • getChildren

      @ApiDoc(comment="Get the element\'s children passing the given typed filter.", since="4.0") <T extends StoreElement> Listable<T> getChildren(@NotNull Filter.TypedFilter<T> filter, boolean recurse)
      Get the element's children passing the given typed filter.
      Parameters:
      filter - The filter to be used.
      recurse - If true, recursively collects children.
      Returns:
      A listable on matching children.
      Since:
      4.0
      Example:
      Usage example with a StoreElementFilter.
      import de.espirit.firstspirit.access.store.*;
      
      import de.espirit.common.util.Listable;
      import de.espirit.firstspirit.access.UserService;
      import de.espirit.firstspirit.access.project.Project;
      import de.espirit.firstspirit.access.store.Store.Type;
      import de.espirit.firstspirit.access.store.pagestore.Page;
      import de.espirit.firstspirit.access.store.pagestore.PageFolder;
      import de.espirit.firstspirit.access.store.pagestore.PageStoreRoot;
      
      import java.util.HashMap;
      import java.util.Iterator;
      import java.util.Map;
      
      
      /**
       * Example how to use StoreElementFilter.
       *
       * @since 4.2.410
       */
      public class StoreElementFilterExample {
      
      
      	/**
      	 * Example how to use a StoreElementFilter which filters PageFolders and Pages within the {@link PageStoreRoot PageStore} of the given {@link Project} using an iterator.<br/>
      	 *
      	 * <b>Important:</b> In case of usage in a Beanshell script the usage of an iterator is mandatory, because Beanshell doesn't support java "for each" syntax.
      	 * For usage in java code the "for each" syntax is recommended -> see {@link #getFilteredChildren_ForEach(de.espirit.firstspirit.access.project.Project)} for details.
      	 *
      	 * @return the filtered storelements
      	 * @see #getFilteredChildren_ForEach(de.espirit.firstspirit.access.project.Project)
      	 * @since 4.2.410
      	 */
      	public Map<String, IDProvider> getFilteredChildren_Iterator(final Project project) {
      		final UserService userService = project.getUserService();
      		final Store currentPageStore = userService.getStore(Type.PAGESTORE, false);
      
      		final StoreElementFilter filter = StoreElementFilter.on(PageFolder.class, Page.class);
      
      		// get filtered children recursive
      		final Listable<StoreElement> filteredListable = currentPageStore.getChildren(filter, true);
      
      		final Map<String, IDProvider> result = new HashMap<String, IDProvider>();
      
      		final Iterator<StoreElement> filteredIterator = filteredListable.iterator();
      		while (filteredIterator.hasNext()) {
      			// we filtered on Page and PageFolder, therefore we can cast to IdProvider without risk
      			final IDProvider idProvider = (IDProvider) filteredIterator.next();
      			if (idProvider.hasUid()) {
      				result.put(idProvider.getUid(), idProvider);
      			}
      		}
      
      		return result;
      	}
      
      
      	/**
      	 * Example how to use a StoreElementFilter which filters PageFolders and Pages within the {@link PageStoreRoot PageStore} of the given {@link Project} using "for each" syntax.<br/>
      	 *
      	 * <b>Important:</b> In a Beanshell script the "for each" is not supported, therefore an iterator should be used -> see {@link #getFilteredChildren_Iterator(de.espirit.firstspirit.access.project.Project)} for details.
      	 *
      	 * @return the filtered storelements
      	 * @see #getFilteredChildren_Iterator(de.espirit.firstspirit.access.project.Project)
      	 * @since 4.2.410
      	 */
      	public Map<String, IDProvider> getFilteredChildren_ForEach(final Project project) {
      		final UserService userService = project.getUserService();
      		final Store currentPageStore = userService.getStore(Type.PAGESTORE, false);
      
      		final StoreElementFilter filter = StoreElementFilter.on(PageFolder.class, Page.class);
      
      		// get filtered children recursive
      		final Listable<StoreElement> filteredListable = currentPageStore.getChildren(filter, true);
      
      		final Map<String, IDProvider> result = new HashMap<String, IDProvider>();
      
      		for (final StoreElement storeElement : filteredListable) {
      			// we filtered on Page and PageFolder, therefore we can cast to IdProvider without risk
      			final IDProvider idProvider = (IDProvider) storeElement;
      			if (idProvider.hasUid()) {
      				result.put(idProvider.getUid(), idProvider);
      			}
      		}
      
      		return result;
      	}
      }
      
    • appendChild

      @Deprecated void appendChild(StoreElement child)
      Deprecated.
      since 4.2.204 - use IDProvider#moveChild(child)
      Throws:
      IllegalArgumentException - if child is not a child node fo this node.
      Since:
      3.0
      See Also:
    • appendChildBefore

      @Deprecated void appendChildBefore(@NotNull @NotNull StoreElement child, @Nullable @Nullable StoreElement nextsibling)
      Deprecated.
      Appends the given child to the children list before the given nextsibling element.

      If you want to append a child from a different parent, use moveChild(child) or moveChild(child, nextSiblingIndex)
      Attention: It's necessary to lock and save all parts of the operation (parent and child)
      You need permission can change and can append leaf (if given child is a leaf node) or can append folder (if given child is a folder)

      Example 1 (position ordering - same parent):

       parent.setLock(true, false); // non recursive lock
       move.setLock(true, false);   // non recursive lock -> avoid concurrent change
       try {
               parent.removeChild(moveNode);
               parent.appendChildBefore(moveNode, nextSibling);  // append 'moveNode' before 'nextSibling'
               parent.save("position changed", false);           // non recursive save
               // it's not necessary to save 'moveNode' because parent hasn't changed
       } finally {
               move.setLock(false, false);   // non recursive unlock
               parent.setLock(false, false); // non recursive unlock
       }
       
      Parameters:
      child - the child to append to the children list of this element
      nextsibling - the child will be appended before the nextsibling node
      Throws:
      IllegalArgumentException - if child is not a child node fo this node.
      Since:
      3.0.3
      See Also:
    • removeChild

      @ApiDoc(comment="Removes the given child from this element.", since="3.0.7") void removeChild(StoreElement child)
      Removes the given child from this element. If the given element isn't in the children list of this element, nothing will happen.

      If you want to move a child to a different parent, is recommended to use moveChild(child) or moveChild(child, nextSiblingIndex)
      Attention: It's necessary to lock and save all parts of the operation (parent and child)
      You need permission can change and can delete (if given child is a leaf node) or can delete folder (if given child is a folder)

      Example 1 (position ordering - same parent):

       parent.setLock(true, false);                       // non recursive lock
       move.setLock(true, false);                         // non recursive lock -> avoid concurrent change
       try {
              parent.removeChild(moveNode);
              parent.appendChildBefore(moveNode, nextSibling);  // append 'moveNode' before 'nextSibling'
              parent.save("position changed", false);           // non recursive save
              // it's not necessary to save 'moveNode' because parent hasn't changed
       } finally {
              move.setLock(false, false);                       // non recursive unlock
              parent.setLock(false, false);                     // non recursive unlock
       }
       

      Example 2 (move to another folder -> it's recommended to use move(child) instead):

       parent.setLock(true, false);                 // non recursive lock
       move.setLock(true, false);                   // non recursive lock
       newParent.setLock(true, false);              // non recursive lock
       try {
              parent.removeChild(moveNode);
              newParent.appendChild(moveNode);            // move 'moveNode' to 'newparent'
              parent.save("removed", false);              // non recursive save
              newParent.save("moveNode added", false);    // non recursive save
              moveNode.save("parent changed", false);     // non recursive save
       } finally {
              parent.setLock(false, false);               // non recursive unlock
              move.setLock(false, false);                 // non recursive unlock
              newParent.setLock(false, false);            // non recursive unlock
       }
       
      Parameters:
      child - the child to remove
      Since:
      3.0.7
      See Also:
    • replaceChild

      @ApiDoc(comment="Replaces an element\'s child by another child.", since="3.0.7") void replaceChild(StoreElement oldChild, StoreElement newChild)
      Replaces an element's child by another child.
      Parameters:
      oldChild - The element's child which should be replaced.
      newChild - The new child which replaces the element's old child.
      Since:
      3.0.7
    • getChildCount

      @ApiDoc(comment="", since="3.0.115") int getChildCount()
      Since:
      3.0.115
    • getChildIndex

      @ApiDoc(comment="", since="3.0.115") int getChildIndex(StoreElement child)
      Since:
      3.0.115
    • getParent

      @ApiDoc(comment="Return parent StoreElement which is null for deleted elements or store-roots.", since="2.3") @Nullable @Nullable StoreElement getParent()
      Return parent StoreElement which is null for deleted elements or store-roots.
      Returns:
      parent StoreElement which is null for deleted elements or store-roots.
      Since:
      2.3
    • getNextSibling

      @ApiDoc(comment="Provides the next sibling store element.", since="4.0.17") @Nullable @Nullable StoreElement getNextSibling()
      Provides the next sibling store element. If no such sibling element exists null will be returned.
      Returns:
      the next sibling store element or null if there is none
      Since:
      4.0.17
    • getPreviousSibling

      @ApiDoc(comment="Provides the previous sibling store element.", since="5.2.200804") @Nullable @Nullable StoreElement getPreviousSibling()
      Provides the previous store element. If no such sibling element exists null will be returned.
      Returns:
      the previous sibling store element or null if there is none
      Since:
      5.2.200804
    • getFirstChild

      @ApiDoc(comment="Provides the first child node.", since="4.0.17") @Nullable @Nullable StoreElement getFirstChild()
      Provides the first child node. If no child node exists null will be returned.
      Returns:
      the first child node or null if there are no childs
      Since:
      4.0.17
    • getStore

      @ApiDoc(comment="Provides the store related to the element.", since="2.3") @NotNull @NotNull Store getStore()
      Provides the store related to the element. Can't be null.
      Returns:
      The store relating to the element.
      Since:
      2.3
    • isFolder

      @ApiDoc(comment="Checks if the element is a folder.", since="3.0") boolean isFolder()
      Checks if the element is a folder.
      Returns:
      boolean: true if the element is a folder, else false
      Since:
      3.0
    • isPermissionSupported

      @ApiDoc(comment="Indicates whether this element supports permissions or not.", since="2.3") boolean isPermissionSupported()
      Indicates whether this element supports permissions or not.
      Returns:
      true if this element supports permissions, false otherwise
      Since:
      2.3
    • hasPermissions

      @ApiDoc(comment="Indicates whether for this element permissions are defined or not.", since="4.0.17") boolean hasPermissions()
      Indicates whether for this element permissions are defined or not.
      Returns:
      true if this element has defined permissions, false otherwise
      Since:
      4.0.17
    • getPermission

      @ApiDoc(comment="Returns the permission object for the current user even if permission checking is turned off.", since="2.3") Permission getPermission()
      Returns the permission object for the current user even if permission checking is turned off.
      Since:
      2.3
    • getPermission

      @ApiDoc(comment="Returns the correct permission object even if permission checking is turned off.", since="2.3") Permission getPermission(User user)
      Returns the correct permission object even if permission checking is turned off.
      Since:
      2.3
    • getPermission

      @ApiDoc(comment="Returns the correct permission object even if permission checking is turned off.", since="2.3") Permission getPermission(Group group)
      Returns the correct permission object even if permission checking is turned off.
      Since:
      2.3
    • setPermission

      @ApiDoc(comment="Set the defined permission for the given user.", since="2.3") void setPermission(User user, Permission permission)
      Set the defined permission for the given user.
      Parameters:
      user - The user which receives the permission.
      permission - The permission the user should receive.
      Since:
      2.3
    • setPermission

      @ApiDoc(comment="Set the defined permission for several users.", since="2.3") void setPermission(User[] users, Permission permission)
      Set the defined permission for several users.
      Parameters:
      users - The users which receives the permission.
      permission - The permission that should be granted for the users.
      Since:
      2.3
    • setPermission

      @ApiDoc(comment="Set the defined permission for the given group.", since="2.3") void setPermission(Group group, Permission permission)
      Set the defined permission for the given group.
      Parameters:
      group - The group which should receives the permission.
      permission - The permission that should be granted for the group.
      Since:
      2.3
    • removePermission

      @ApiDoc(comment="Removes the permission object for the given user.", since="2.3") void removePermission(User user)
      Removes the permission object for the given user.
      Parameters:
      user - The user for which the permission object should be removed.
      Since:
      2.3
    • removePermission

      @ApiDoc(comment="Removes the permission object for several given users.", since="2.3") void removePermission(User[] users)
      Removes the permission object for several given users.
      Parameters:
      users - Several user for that the permission object should be removed.
      Since:
      2.3
    • removePermission

      @ApiDoc(comment="Removes the permission object for a given group.", since="2.3") void removePermission(Group group)
      Removes the permission object for a given group.
      Parameters:
      group - The group for which the permission object should be removed.
      Since:
      2.3
    • getTreePermission

      @ApiDoc(comment="Return permissions combined from defined and inherited permissions for current user.", since="3.0.59") de.espirit.firstspirit.store.access.PermissionMap getTreePermission()
      Return permissions combined from defined and inherited permissions for current user.
      Returns:
      the permission object
      Since:
      3.0.59
    • getDefinedPrincipalPermissions

      @ApiDoc(comment="Returns a list of Principal\'s for which permissions are defined at this storeelement.", since="3.1.187") @NotNull @NotNull List<Principal> getDefinedPrincipalPermissions()
      Returns a list of Principal's for which permissions are defined at this storeelement.
      Returns:
      list of Principal's
      Since:
      3.1.187
    • getInheritedPrincipalPermissions

      @ApiDoc(comment="Returns a list of Principal\'s for which permissions are defined at this storelement including the inherited permissions on parent path.", since="3.1.187") @NotNull @NotNull List<Principal> getInheritedPrincipalPermissions()
      Returns a list of Principal's for which permissions are defined at this storelement including the inherited permissions on parent path.
      Returns:
      list of Principal's
      Since:
      3.1.187
    • getLastChanged

      @ApiDoc(comment="", since="2.3") long getLastChanged()
      Since:
      2.3
    • getEditor

      @ApiDoc(comment="", since="2.3") @Nullable @Nullable User getEditor()
      Since:
      2.3
    • isWorkflowSupported

      @ApiDoc(comment="Checks if a workflow might be executed at the element.", since="3.0.1") boolean isWorkflowSupported()
      Checks if a workflow might be executed at the element.
      Returns:
      boolean: true if the element supports workflows, else false
      Since:
      3.0.1
    • getWorkflowPermissions

      @ApiDoc(comment="Return all existing workflow permissions.", since="3.0.1") WorkflowPermission[] getWorkflowPermissions()
      Return all existing workflow permissions.
      Since:
      3.0.1
    • getWorkflowPermission

      @ApiDoc(comment="Return workflow permission object for the given workflow.", since="3.0.1") @Nullable @Nullable WorkflowPermission getWorkflowPermission(@Nullable @Nullable Workflow workflow)
      Return workflow permission object for the given workflow. Use null as parameter for all workflows. If no permissions exist null is returned.
      Since:
      3.0.1
    • getCreateWorkflowPermission

      @ApiDoc(comment="Return workflow permission object for the given workflow.", since="4.0.120") @NotNull @NotNull WorkflowPermission getCreateWorkflowPermission(@Nullable @Nullable Workflow workflow)
      Return workflow permission object for the given workflow. Use null as parameter for all workflows. If no permissions exist a new empty permission object is created. You have to call setWorkflowPermission afterwards to save your changes.
      Since:
      4.0.120
    • setWorkflowPermission

      @ApiDoc(comment="", since="3.0.1") void setWorkflowPermission(WorkflowPermission permission)
      Since:
      3.0.1
    • setWorkflowPermissions

      @ApiDoc(comment="", since="3.0.1") void setWorkflowPermissions(WorkflowPermission[] permissions)
      Since:
      3.0.1
    • removeWorkflowPermission

      @ApiDoc(comment="", since="3.0.1") void removeWorkflowPermission(Workflow workflow)
      Since:
      3.0.1
    • removeAllWorkflowPermissions

      @ApiDoc(comment="", since="3.0.1") void removeAllWorkflowPermissions()
      Since:
      3.0.1
    • isWorkflowAllowed

      @ApiDoc(comment="Returns true if workflow is not null and is explicitly allowed to be started on this element by given user or workflow is null and any workflow is allowed to be started on this element by given user, false otherwise.", since="3.0.1") boolean isWorkflowAllowed(@Nullable @Nullable Workflow workflow, User user)
      Returns true if
      • workflow is not null and is explicitly allowed to be started on this element by given user or
      • workflow is null and any workflow is allowed to be started on this element by given user.
      , false otherwise.
      Since:
      3.0.1
    • inheritWorkflowPermission

      @ApiDoc(comment="Returns a boolean state, whether the workflow permissions should be inherited for this StoreElement or not.", since="3.0.1") boolean inheritWorkflowPermission()
      Returns a boolean state, whether the workflow permissions should be inherited for this StoreElement or not.
      If true the WorkflowPermissions of parent StoreElement used, false otherwise.

      Note:
      Store has no parent and return always false
      Returns:
      true for workflow permission inheritance, false otherwise.
      Since:
      3.0.1
    • setInheritWorkflowPermission

      @ApiDoc(comment="Sets a boolean flag to enable or disable the inheritance of workflow permissions for this StoreElement.", since="3.0.1") void setInheritWorkflowPermission(boolean inherit)
      Sets a boolean flag to enable or disable the inheritance of workflow permissions for this StoreElement.
      If true the WorkflowPermissions of parent StoreElement used, false otherwise.

      Note:
      Store has no parent and inheritWorkflowPermission() return always false
      Parameters:
      inherit - true for workflow permission inheritance, false otherwise.
      Since:
      3.0.1
    • setWriteLock

      @ApiDoc(comment="A write lock is a flag to prevent changes e.g. while a workflow is active for this element.", since="3.0.4") void setWriteLock(boolean lock)
      A write lock is a flag to prevent changes e.g. while a workflow is active for this element.
      Parameters:
      lock - true to signal changes on this element should be prevented
      Since:
      3.0.4
      See Also:
    • getWriteLock

      @ApiDoc(comment="A write lock is a flag to prevent changes e.g. while a workflow is active for this element.", since="3.0.4") boolean getWriteLock()
      A write lock is a flag to prevent changes e.g. while a workflow is active for this element.
      Returns:
      true if the element is locked to prevent changes
      Since:
      3.0.4
      See Also:
    • isLockSupported

      @ApiDoc(comment="Check this before using any lock method.", since="2.3") boolean isLockSupported()
      Check this before using any lock method.
      Returns:
      true if this node supports locking
      Since:
      2.3
      See Also:
    • setLock

      @ApiDoc(comment="Lock or unlock this element and all children.", since="2.3") void setLock(boolean lock) throws LockException, ElementDeletedException
      Lock or unlock this element and all children. Same as setLock(lock, true).
      Throws:
      LockException
      ElementDeletedException
      Since:
      2.3
      See Also:
    • setLock

      @ApiDoc(comment="Lock or unlock this element, if recursive == true all children are also (un)locked.", since="4.0.17") void setLock(boolean lock, boolean recursive) throws LockException, ElementDeletedException
      Lock or unlock this element, if recursive == true all children are also (un)locked.
      Throws:
      LockException
      ElementDeletedException
      Since:
      4.0.17
    • isLocked

      @ApiDoc(comment="Checks if this node is locked by this session.", since="3.1.158") boolean isLocked()
      Checks if this node is locked by this session.
      Returns:
      true if this node is locked
      Throws:
      UnsupportedOperationException - if isLockSupported() is false
      Since:
      3.1.158
      See Also:
    • isLockedOnServer

      @ApiDoc(comment="Checks if this storeelement is locked on the server.", since="3.1.158") boolean isLockedOnServer(boolean allSessions)
      Checks if this storeelement is locked on the server.
      Parameters:
      allSessions - true all sessions are checked, false only current session is checked
      Returns:
      true wether this object is locked on the server, false otherwise
      Since:
      3.1.158
    • save

      @ApiDoc(comment="Saves the node and all childs, shortcut for save(null, true).", since="2.3") void save()
      Saves the node and all childs, shortcut for save(null, true).

      Use isLockSupported() to check if save operation is supported.

      Since:
      2.3
      See Also:
    • save

      @ApiDoc(comment="Saves the node and all childs.", since="4.0") void save(String comment)
      Saves the node and all childs.

      Use isLockSupported() to check if save operation is supported.

      Parameters:
      comment - comment for the revision which is created during save
      Since:
      4.0
    • save

      @ApiDoc(comment="Saves this node.", since="4.0") void save(String comment, boolean saveChilds)
      Saves this node. Use saveChilds == true to save recursive all children
      Parameters:
      comment - comment
      saveChilds - true to save recursive all children, otherwise use false
      Since:
      4.0
    • delete

      @ApiDoc(comment="Deletes this storeelement.", since="2.3") void delete() throws LockException
      Deletes this storeelement. This operation needs a lock to this storeelement.
      Specified by:
      delete in interface Workflowable
      Throws:
      LockException - if the direct parent is locked in a different session
      Since:
      2.3
    • refresh

      @ApiDoc(comment="Refreshes this element if there is a newer version on the server.", since="2.3") void refresh()
      Refreshes this element if there is a newer version on the server.
      Since:
      2.3
    • toXml

      @ApiDoc(comment="Creates the xml representation of the node with all children but without indentation and line breaks.", since="2.3") String toXml()
      Creates the xml representation of the node with all children but without indentation and line breaks.
      Returns:
      the xml representation the node with all children without indentation and line breaks
      Since:
      2.3
    • toXml

      @ApiDoc(comment="Creates the xml representation with or without all children depending on the given parameter.", since="4.0") String toXml(boolean includeChilds)
      Creates the xml representation with or without all children depending on the given parameter.
      Parameters:
      includeChilds - if true the xml of id childs is included
      Returns:
      the xml representation the node without indentation and line breaks
      Since:
      4.0
    • toXml

      @ApiDoc(comment="Creates the xml representation with or without children, line breaks and indentation depending on the given parameters.", since="4.0") String toXml(boolean includeChildren, boolean prettyPrinting)
      Creates the xml representation with or without children, line breaks and indentation depending on the given parameters.
      Parameters:
      includeChildren - if true the xml of id children is included
      prettyPrinting - if true to get the xml strings with line breaks and indentation
      Returns:
      the xml representation the node with indentation and line breaks
      Since:
      4.0
    • isImportSupported

      @ApiDoc(comment="Checks if the element supports import.", since="3.0.1") boolean isImportSupported()
      Checks if the element supports import.
      Returns:
      boolean: true if import is supported, else false
      Since:
      3.0.1
    • isExportSupported

      @ApiDoc(comment="Checks if the element supports export.", since="3.0.1") boolean isExportSupported()
      Checks if the element supports export.
      Returns:
      boolean: true if the element supports export, else false
      Since:
      3.0.1
    • exportStoreElement

      @ApiDoc(comment="Exports this storeelement as zip file to the given outputstream.", since="3.0.7") void exportStoreElement(OutputStream out, @Nullable @Nullable ExportHandler exportHandler) throws IOException
      Exports this storeelement as zip file to the given outputstream.
      Parameters:
      exportHandler - the export events will be reported to this handler (may be null)
      out - the output stream the zip export file will be written to
      Throws:
      IOException
      Since:
      3.0.7
    • importStoreElement

      @ApiDoc(comment="Imports the first root node from the given zip exportfile.", since="3.0.7") StoreElement importStoreElement(ZipFile exportFile, @Nullable @Nullable ImportHandler importHandler) throws IOException, ElementDeletedException, WorkflowLockException
      Imports the first root node from the given zip exportfile. The created node is not locked, it is necessary to lock, save and unlock the imported element.
      Parameters:
      exportFile - Zip export file to import from.
      importHandler - Import handler, may be null.
      Returns:
      First element from exportfile (the node mayhave an arbitrary number of child nodes).
      Throws:
      IOException - If an io error occurs when handling given zip file.
      ElementDeletedException - If this element is already deleted.
      WorkflowLockException - If this element is locked in a workflow.
      Since:
      3.0.7
    • importStoreElements

      @ApiDoc(comment="Imports all root nodes from the given zip exportfile.", since="4.0.47") Listable<StoreElement> importStoreElements(ZipFile exportFile, @Nullable @Nullable ImportHandler importHandler) throws IOException, ElementDeletedException, WorkflowLockException
      Imports all root nodes from the given zip exportfile. The created nodes are not locked, it is necessary to lock, save and unlock them.
      Parameters:
      exportFile - Zip export file to import from.
      importHandler - Import handler, may be null.
      Returns:
      List of imported elements (each node may have an arbitrary number of child nodes).
      Throws:
      IOException - If an io error occurs when handling given zip file.
      ElementDeletedException - If this element is already deleted.
      WorkflowLockException - If this element is locked in a workflow.
      Since:
      4.0.47
    • getElementType

      @ApiDoc(comment="", since="3.0.7") String getElementType()
      Since:
      3.0.7
    • getProject

      @ApiDoc(comment="Returns the belonging project of this storeelement.", since="4.0") Project getProject()
      Returns the belonging project of this storeelement.
      Returns:
      the belonging project
      Since:
      4.0
    • getIncomingReferences

      @ApiDoc(comment="Returns all incoming references of this StoreElement.", since="3.1.172") @NotNull @NotNull ReferenceEntry[] getIncomingReferences()
      Returns all incoming references of this StoreElement.
      Returns:
      all incoming references for this StoreElement.
      Since:
      3.1.172
      See Also:
    • hasIncomingReferences

      @ApiDoc(comment="Returns true if this StoreElement has incoming references.", since="4.0") boolean hasIncomingReferences()
      Returns true if this StoreElement has incoming references. This method is more efficient and less time consuming than getIncomingReferences().length > 0.
      Returns:
      true if this StoreElement has incoming references.
      Since:
      4.0
    • getOutgoingReferences

      @ApiDoc(comment="Returns all outgoing references of this StoreElement.", since="3.1.172") @NotNull @NotNull ReferenceEntry[] getOutgoingReferences()
      Returns all outgoing references of this StoreElement.
      Returns:
      all outgoing references of this StoreElement.
      Since:
      3.1.172
    • getReferenceName

      @ApiDoc(comment="Provided the element\'s reference name.", since="4.0.17") @Nullable @Nullable String getReferenceName()
      Provided the element's reference name. If the element doesn't support referencing null will be provided.
      Returns:
      the refernce text, e.g. used for $CMS_REF(..)$ expressions, or null if this element supports no referencing
      Since:
      4.0.17
    • getReferences

      @ApiDoc(comment="Returns current outgoing references of this store element.", since="4.0.17") Set<ReferenceEntry> getReferences()
      Returns current outgoing references of this store element.
      Returns:
      current outgoing references.
      Since:
      4.0.17
    • isDeleted

      @ApiDoc(comment="Returns the state of deletion. true if element is deleted and false if its not", since="4.2.9") boolean isDeleted()
      Returns the state of deletion. true if element is deleted and false if its not
      Returns:
      true if element is deleted, false otherwise
      Since:
      4.2.9