All Superinterfaces:
Comparable<StoreElement>, DatasetProvider, HistoryProvider, IDProvider, PackagePoolItem, StoreElement, StoreElementFolder, TemplateProvider<TableTemplate>, Workflowable

@NonExtendable public interface Content2 extends TemplateProvider<TableTemplate>, PackagePoolItem, StoreElementFolder, DatasetProvider
Interface providing means to operate on content2 elements.
Since:
3.0
  • Field Details

  • Method Details

    • getSchema

      @NotNull @NotNull Schema getSchema()
      Returns the schema this content2 refers to.
      Specified by:
      getSchema in interface DatasetProvider
      Returns:
      The schema.
      Since:
      3.0
    • getTemplate

      @NotNull @NotNull TableTemplate getTemplate() throws ReferenceNotFoundException
      Returns the TableTemplate of this content2 node.
      Specified by:
      getTemplate in interface TemplateProvider<TableTemplate>
      Returns:
      the template of type <T>
      Throws:
      ReferenceNotFoundException - if the template is missing
      Since:
      3.0
    • getEntityType

      @NotNull @NotNull EntityType getEntityType()
      Returns the entity type this content2 belongs to.
      Specified by:
      getEntityType in interface DatasetProvider
      Returns:
      the belonging EntityType or throws EntityTypeNotFoundException
      Since:
      4.0
    • getEntity

      @Nullable @Nullable Entity getEntity(Object keyValue)
      Returns the entity found for given keyValue or null.
      Returns:
      The entity found for given keyValue or null.
      Since:
      4.0
    • getData

      @Deprecated List<? extends Entity> getData()
      Deprecated.
      since 5.1.102, use getDatasets()
      Returns the list of entities respecting defined filter and ordering.
      Shortcut for getData(getProject().getMasterLanguage())).
      Returns:
      The list of entities respecting defined filter and ordering.
      Since:
      3.0
      See Also:
    • getDatasets

      List<Dataset> getDatasets()
      Returns the list of datasets respecting defined filter and ordering.
      Shortcut for getData(getProject().getMasterLanguage())).
      Returns:
      The list of entities respecting defined filter and ordering.
      Since:
      5.1.102
      See Also:
    • getDatasets

      List<Dataset> getDatasets(boolean release)
      Returns the list of datasets respecting defined filter, ordering and release state by using the projects master language.
      Shortcut for getDatasets(getProject().getMasterLanguage(), release)).
      Returns:
      The list of entities respecting defined filter, ordering and release state.
      Since:
      5.2.250807
      See Also:
    • getData

      @Deprecated List<? extends Entity> getData(@NotNull @NotNull Language language)
      Deprecated.
      since 5.1.102, use getDatasets(Language).
      Returns the list of entities respecting defined filter and ordering.
      Parameters:
      language - The project language to be used for select.
      Returns:
      The list of entities respecting defined filter and ordering.
      Since:
      4.2.442
      See Also:
    • getDatasets

      List<Dataset> getDatasets(@NotNull @NotNull Language language)
      Returns the list of datasets respecting defined filter and ordering.
      Internally this list is constructed lazily, to maintain this feature one should wrap this list if e.g. only Dataset.getEntity() is needed:
      
           final List<Dataset> datasets = content.getDatasets(language);
           final List<Entity> entities = new AbstractList<Entity>() {
             public Entity get(int i) { return datasets.get(i).getEntity(); }
             public int size() { return datasets.size() }
          };
       
      Parameters:
      language - The project language to be used for select.
      Returns:
      The list of entities respecting defined filter and ordering.
      Since:
      5.1.102
      See Also:
    • getDatasets

      List<Dataset> getDatasets(@NotNull @NotNull Language language, boolean release)
      Returns the list of datasets respecting defined filter, ordering and release state.
      Internally this list is constructed lazily, to maintain this feature one should wrap this list if e.g. only Dataset.getEntity() is needed:
      
           final List<Dataset> datasets = content.getDatasets(language, release);
           final List<Entity> entities = new AbstractList<Entity>() {
             public Entity get(int i) { return datasets.get(i).getEntity(); }
             public int size() { return datasets.size() }
          };
       
      Parameters:
      language - The project language to be used for select.
      release - If true, the datasets in release state are returned, otherwise the datasets in the current state are returned.
      Returns:
      The list of entities respecting defined filter, ordering and release state.
      Since:
      5.2.250807
      See Also:
    • lock

      @Deprecated void lock(Entity entity) throws LockException
      Deprecated.
      since 5.2.201 - use Dataset#setLock(true) instead.
      Throws:
      LockException
      Since:
      4.0
    • unlock

      @Deprecated void unlock(Entity entity) throws LockException
      Deprecated.
      since 5.2.201 - use Dataset#setLock(false) instead.
      Throws:
      LockException
      Since:
      4.0
    • isLocked

      @Deprecated boolean isLocked(Entity entity)
      Deprecated.
      since 5.2.201 - use StoreElement.isLocked() instead.
      Indicates that the given entity is in lock state in the current session.
      Parameters:
      entity - The entity to check its state of.
      Returns:
      true, if the entity is locked, false else
      Since:
      4.2.30
    • isLockedOnServer

      @Deprecated boolean isLockedOnServer(Entity entity, boolean allSessions)
      Deprecated.
      since 5.2.201 - use StoreElement.isLockedOnServer(boolean) instead.
      Indicates that the given entity is locked on server side.
      Parameters:
      entity - The entity in question.
      allSessions - If true, all sessions are checked, otherwise, only the current session is checked.
      Returns:
      true, if locked on server.
      Since:
      5.0.404
    • release

      @Deprecated void release(Entity entity) throws LockException
      Deprecated.
      since 5.2.201 - use IDProvider.release() instead.
      Throws:
      LockException
      Since:
      4.0
    • release

      @Deprecated void release(Entity entity, String comment) throws LockException
      Deprecated.
      since 5.2.201 - use IDProvider.release() instead.
      Throws:
      LockException
      Since:
      4.1.23
    • delete

      @Deprecated void delete(Entity entity) throws LockException
      Deprecated.
      since 5.2.201 - use StoreElement.delete() instead.
      Throws:
      LockException
      Since:
      4.0
    • getWorkflowable

      @Nullable @Nullable Workflowable getWorkflowable(Entity entity)
      Get a workflowable instance for the provided entity. Returns null if the provided entity is null or workflows for the provided entity are not supported (e.g. because the corresponding schema is read only).
      Since:
      4.0
    • getDataset

      @NotNull @NotNull Dataset getDataset(@NotNull @NotNull Entity entity)
      Get a dataset for the given entity.
      Specified by:
      getDataset in interface DatasetProvider
      Parameters:
      entity - The entity to get as Dataset.
      Returns:
      A dataset on the given entity.
      Since:
      4.0.30
    • getContent2Params

      @NotNull @NotNull Content2Params getContent2Params()
      Returns the params of this content2.
      Returns:
      The params of this content2.
      Since:
      4.0.130
    • isFiltered

      boolean isFiltered()
      Returns true if the view is filterd (getContent2Params().getQuery() is not null).
      Since:
      4.1
      See Also: