Class GenericRI

java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.AbstractAPI
mc.core.domain.generic.GenericRI

@Path("/") @Produces("application/json") public class GenericRI extends AbstractAPI
The generic RI class extends the generic API and exposes relevant functions as REST enabled URIs. The generic objects are by default the products (nodes) in mediapim.
  • Constructor Details

    • GenericRI

      public GenericRI()
  • Method Details

    • nodeInsert

      @POST @Path("node") public javax.ws.rs.core.Response nodeInsert() throws UserException, ApplicationException, IOException
      POST: node?data=[jsonDataMap]

      Insert a new node with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeSave(Node, DataMap)
    • nodeEdit

      @POST @Path("node/{key}") public javax.ws.rs.core.Response nodeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: node/{key}?data=[jsonDataMap]

      Save changes to a node with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeSave(Node, DataMap)
    • nodeDelete

      @DELETE @Path("node/{key}") public void nodeDelete(@PathParam("key") String key, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException
      DELETE: node/{key}?force=false

      Delete a node with children. Force is required to delete a node with dependencies and/or children

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.nodeDelete(Node, boolean)
    • nodeDelete

      @DELETE @Path("node") public void nodeDelete(@QueryParam("nodeKey") Set<String> nodeKey, @QueryParam("force") boolean force) throws UserException, ApplicationException
      DELETE: node?force=false&nodeKey={nodeKey1}&nodeKey={nodeKey2}...

      Delete list of nodes with children. Force is required to delete a node with dependencies and/or children

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.nodeDelete(List, boolean)
    • nodeCopy

      @POST @Path("node/{key}/copy") public javax.ws.rs.core.Response nodeCopy(@PathParam("key") String key, @QueryParam("parent") String parentKey) throws UserException, ApplicationException, IOException
      POST: node/{key}/copy?parent={parentKey}

      Copy node defined by key to a new parent or same parent as source node.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeCopy(Node, Node)
    • nodeMove

      @POST @Path("node/{key}/move/{parentKey}") public javax.ws.rs.core.Response nodeMove(@PathParam("key") String key, @PathParam("parentKey") String parentKey) throws UserException, ApplicationException, IOException
      POST: node/{key}/move/{parentKey}

      Move node defined by key to a new parent.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeMove(Node, Node)
    • nodeAddClassification

      @POST @Path("node/{key}/classification/{classificationKey}") public void nodeAddClassification(@PathParam("key") String key, @PathParam("classificationKey") String classificationKey) throws ApplicationException
      POST: node/{key}/classification/{classificationKey}

      Add classification to node.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeAddClassification(Node, Classification)
    • nodeRemoveClassification

      @DELETE @Path("node/{key}/classification/{classificationKey}") public void nodeRemoveClassification(@PathParam("key") String key, @PathParam("classificationKey") String classificationKey, @QueryParam("removeClassificationAttributes") boolean removeClassificationAttributes) throws ApplicationException
      DELETE: node/{key}/classification/{classificationKey}?removeClassificationAttributes={removeClassificationAttributes}

      Remove classification from node.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeRemoveClassification(Node, Classification, boolean)
    • nodeArchive

      @POST @Path("node/{key}/archive") public void nodeArchive(@PathParam("key") String key) throws UserException, ApplicationException
      POST: node/{key}/archive

      Move node to archive.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.nodeArchive(Node)
    • nodeArchiveRestore

      @POST @Path("node/{key}/restore") public void nodeArchiveRestore(@PathParam("key") String key) throws UserException, ApplicationException
      POST: node/{key}/restore

      Restore node from archive.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.nodeArchive(Node)
    • nodeHrcTypeInsert

      @POST @Path("nodehrctype") public javax.ws.rs.core.Response nodeHrcTypeInsert() throws UserException, ApplicationException, IOException
      POST: nodehrctype?data=[jsonDataMap]

      Insert a new nodehrc type (product hierarchy type) with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeHrcTypeSave(NodeHrcType, DataMap)
    • nodeHrcTypeEdit

      @POST @Path("nodehrctype/{key}") public javax.ws.rs.core.Response nodeHrcTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: nodehrctype/{key}?data=[datamap in json]

      Save changes to a nodehrc type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeHrcTypeSave(NodeHrcType, DataMap)
    • nodeHrcTypeDelete

      @DELETE @Path("nodehrctype/{key}") public void nodeHrcTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException
      DELETE: nodehrctype/{key}

      Delete a nodehrc type defined by key. Only possible when its nodehrc is not in use.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.nodeHrcTypeDelete(NodeHrcType)
    • nodeHrcEdit

      @POST @Path("nodehrc/{key}") public javax.ws.rs.core.Response nodeHrcEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: nodehrc/{key}?data=[datamap in json]

      Save changes to a nodeHrc with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeHrcSave(NodeHrc, DataMap)
    • ctAttributeAdd

      @POST @Path("type/{entityName}/{key}/attribute/add") public void ctAttributeAdd(@PathParam("entityName") String entityName, @PathParam("key") String key, @QueryParam("attributeKey") Set<String> attributeKey, @QueryParam("byCollection") @DefaultValue("false") boolean byCollection) throws ApplicationException
      POST: type/{entityName}/{key}/attribute/add?attributeKey=abc&attributeKey=cde&byCollection=true

      Add attributes as type attributes to complex entity type if not already assigned. Sort by collection or overall

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ctAttributeAdd(ComplexTypeEntity, List, boolean)
    • ctAttributeTypeAdd

      @POST @Path("type/{entityName}/{key}/attributetype/{attributeTypeKey}/add") public void ctAttributeTypeAdd(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("attributeTypeKey") String attributeTypeKey) throws ApplicationException
      POST: type/{entityName}/{key}/attributetype/{attributeTypeKey}/add

      Add attribute type to complex type entity

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ctAttributeTypeAdd(ComplexTypeEntity, AttributeType)
    • ctAttributeChangeOrder

      @POST @Path("type/{entityName}/{key}/attribute/{attributeKey}/move") public void ctAttributeChangeOrder(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("attributeKey") String attributeKey, @QueryParam("byCollection") @DefaultValue("false") boolean byCollection, @QueryParam("up") @DefaultValue("true") boolean decreaseOrder) throws ApplicationException
      POST: type/{entityName}/{key}/attribute/{attributeKey}/move?up=false&byCollection=false

      Change ordering of assigned type attributes of the complex type.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ctAttributeChangeOrder(ComplexTypeEntity, Attribute, boolean, boolean)
    • ctAttributesSetMandatoryAndPreviewFlags

      @POST @Path("type/{entityName}/{key}/attribute/configure") public void ctAttributesSetMandatoryAndPreviewFlags(@PathParam("entityName") String entityName, @PathParam("key") String key, @QueryParam("mandatoryKey") Set<String> mandatoryKey, @QueryParam("previewKey") Set<String> previewKey) throws ApplicationException
      POST: type/{entityName}/{key}/attribute/configure?mandatoryKey=abc&mandatoryKey=cde&previewKey=fgh&previewKey=abc

      sets all given type attributes to mandatory/preview, all others to not mandatory/not preview.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ctAttributesSetMandatoryAndPreviewFlags(ComplexTypeEntity, List, List)
    • ctAttributesSetEditable

      @POST @Path("type/{entityName}/{key}/attribute/editable") public void ctAttributesSetEditable(@PathParam("entityName") String entityName, @PathParam("key") String key, @QueryParam("attributeKey") Set<String> attributeKey, @QueryParam("editable") @DefaultValue("false") boolean value) throws ApplicationException
      POST: type/{entityName}/{key}/attribute/editable?attributeKey=abc&attributeKey=cde&editable=true

      sets the editable-flag of all given type attributes to value of query parameter editable if given, default is false

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ctAttributesSetEditable(ComplexTypeEntity, List, boolean)
    • ctStateGroupTypesAdd

      @DELETE @Path("type/{entityName}/{key}/stategrouptype") public void ctStateGroupTypesAdd(@PathParam("entityName") String entityName, @PathParam("key") String key, @QueryParam("stateGroupTypeKey") Set<String> stateGroupTypeKey) throws ApplicationException
      POST: type/{entityName}/{key}/stategrouptype?stateGroupTypeKey=abc&stateGroupTypeKey=cde

      adds each state group type from given list to complex type entity, if not already present

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ctStateGroupTypesAdd(ComplexTypeEntity, List)
    • ctStateGroupTypeRemove

      @DELETE @Path("type/{entityName}/{key}/stategrouptype/{stateGroupTypeKey}") public void ctStateGroupTypeRemove(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("stateGroupTypeKey") String stateGroupTypeKey) throws ApplicationException
      DELETE: type/{entityName}/{key}/stategrouptype/{stateGroupTypeKey}

      removes state group type from complex type entity

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ctStateGroupTypeRemove(ComplexTypeEntity, StateGroupType)
    • nodeTypeInsert

      @POST @Path("nodetype") public javax.ws.rs.core.Response nodeTypeInsert() throws UserException, ApplicationException, IOException
      POST: nodetype?data=[jsonDataMap]

      Insert a new node type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeTypeSave(NodeType, DataMap)
    • nodeTypeEdit

      @POST @Path("nodetype/{key}") public javax.ws.rs.core.Response nodeTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: nodetype/{key}?data=[datamap in json]

      Save changes to a node type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeTypeSave(NodeType, DataMap)
    • nodeTypeDelete

      @DELETE @Path("nodetype/{key}") public void nodeTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException
      DELETE: nodetype/{key}

      Delete a node type if not in use.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.nodeTypeDelete(NodeType)
    • nodeTypeRemoveAttribute

      @DELETE @Path("nodetype/{key}/attribute/{attributeKey}") public void nodeTypeRemoveAttribute(@PathParam("key") String key, @PathParam("attributeKey") String attributeKey, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException
      DELETE: nodetype/{key}/attribute/{attributeKey}?force=false

      Remove a type attribute from node type. Force is required to delete even if nodes of this type have assignments to this attribute

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.ctRemoveAttribute(NodeType, Attribute, boolean)
    • nodeTypeRemoveAttributeType

      @DELETE @Path("nodetype/{key}/attributetype/{attributeTypeKey}") public void nodeTypeRemoveAttributeType(@PathParam("key") String key, @PathParam("attributeTypeKey") String attributeTypeKey, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException
      DELETE: nodetype/{key}/attributetype/{attributeTypeKey}?force=false

      Remove an attribute type (object attributes) from node type. Force is required to delete even if nodes of this node type have assignments to attributes of the attribute type

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.ctRemoveAttributeType(NodeType, AttributeType, boolean)
    • ceAttributeAdd

      @POST @Path("{entityName}/{key}/attribute/add") public <T extends ComplexEntity> void ceAttributeAdd(@PathParam("entityName") String entityName, @PathParam("key") String key, @QueryParam("attributeKey") Set<String> attributeKey, @QueryParam("byCollection") @DefaultValue("true") boolean byCollection) throws ApplicationException
      POST: {entityName}/{key}/attribute/add?attributeKey=[key1]&attributeKey=[key2]&byCollection=false

      Assigns a list of (object) attributes to this complex entity if not already assigned.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI#ceAttributeAdd(ComplexEntity, List)
    • ceAttributeRemove

      @DELETE @Path("{entityName}/{key}/attribute/{attributeKey}") public <T extends ComplexEntity> void ceAttributeRemove(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("attributeKey") String attributeKey) throws ApplicationException
      DELETE: {entityName}/{key}/attribute/{attributeKey}

      Removes assignment with all values of this attribute from the complex entity.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceAttributeRemove(ComplexEntity, Attribute)
    • ceAttributeChangeOrder

      @POST @Path("{entityName}/{key}/attribute/{attributeKey}/move") public <T extends ComplexEntity> void ceAttributeChangeOrder(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("attributeKey") String attributeKey, @QueryParam("byCollection") @DefaultValue("true") boolean byCollection, @QueryParam("up") @DefaultValue("true") boolean decreaseOrder) throws ApplicationException
      POST: {entityName}/{key}/attribute/{attributeKey}/move?byCollection=false&up=false

      Change ordering of assigned attributes of the complex entity within same attribute type, optionally within same collection

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceAttributeChangeOrder(ComplexEntity, Attribute, boolean, boolean)
    • ceAttributeValueSet

      @POST @Path("{entityName}/{key}/attribute/{attributeKey}/value") public <T extends ComplexEntity> void ceAttributeValueSet(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("attributeKey") String attributeKey) throws ApplicationException
      POST: {entityName}/{key}/attribute/{attributeKey}/value?data=[dataMap]

      Create or change attribute value for this attribute and complex entity with data provided in the json data map.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI#ceAttributeValueSet(ComplexEntity, Attribute, DataMap)
    • ceAttributeValuesSet

      @POST @Path("{entityName}/{key}/attribute/values") public <T extends ComplexEntity> void ceAttributeValuesSet(@PathParam("entityName") String entityName, @PathParam("key") String key) throws ApplicationException
      POST: {entityName}/{key}/attribute/values?data=[list of attribute/value maps as json]

      Create or change attribute values for complex entity with data provided in the json data map. The data is passed as json String which should have the format:

       [
          {   
              "attribute": "ATTR_1", // key of attribute
              "value": { ... } // value map for attribute
          },
          {   
              "attribute": 12356, // id of attribute
              "value": { ... } // value map for attribute
          }
       ]
       
      Throws:
      ApplicationException
      See Also:
      • GenericAPI#ceAttributeValuesSet(ComplexEntity, Attribute, DataMap)
    • ceAttributeValueRemove

      @DELETE @Path("{entityName}/{key}/attribute/{attributeKey}/value/{dataValueKey}") public <T extends ComplexEntity> void ceAttributeValueRemove(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("attributeKey") String attributeKey, @PathParam("dataValueKey") String dataValueKey) throws ApplicationException
      DELETE: {entityName}/{key}/attribute/{attributeKey}/value/{dataValueKey}.

      Remove data value (locale version of attribute value).

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceAttributeValueRemove(ComplexEntity, Attribute, DataValue)
    • ceAttributeValueRemoveAll

      @DELETE @Path("{entityName}/attribute/value/{entityToAttributeKey}") public <T extends ComplexEntity> void ceAttributeValueRemoveAll(@PathParam("entityName") String entityName, @PathParam("entityToAttributeKey") String entityToAttributeKey) throws ApplicationException
      DELETE: {entityName}/attribute/value/{entityToAttributeKey}

      Remove complex attribute value with all locale versions.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceAttributeValueRemove(EntityToAttribute)
    • ceAttributeValueChangeOrder

      @POST @Path("{entityName}/attribute/value/{entityToAttributeKey}/move") public <T extends ComplexEntity> void ceAttributeValueChangeOrder(@PathParam("entityName") String entityName, @PathParam("entityToAttributeKey") String entityToAttributeKey, @QueryParam("up") @DefaultValue("false") boolean decreaseOrder) throws ApplicationException
      POST: {entityName}/attribute/value/{entityToAttributeKey}/move?up=true

      Change ordering of values of multi valued attribute

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceAttributeValueChangeOrder(EntityToAttribute, boolean)
    • ceGetPreviewAsset

      @GET @Path("{entityName}/{key}/preview") public <T extends ComplexEntity> javax.ws.rs.core.Response ceGetPreviewAsset(@PathParam("entityName") String entityName, @PathParam("key") String key) throws ApplicationException, IOException
      GET: {entityName}/{key}/preview

      get the preview asset for the complex entity

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.ceGetPreviewAsset(ComplexEntity)
    • ceRelationAdd

      @POST @Path("{entityName}/{key}/relation/{relationTypeKey}/add") public <T extends ComplexEntity> void ceRelationAdd(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("relationTypeKey") String relationTypeKey, @QueryParam("relatedKey") Set<String> relatedKey) throws ApplicationException
      POST: {entityName}/{key}/relation/{relationTypeKey}/add?relatedKey=abc&relatedKey=cde

      Create a relation between entity (master) and related entities of the relation type if such a relation not already exists.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceRelationAdd(ComplexEntity, List, RelationType)
    • ceRelationRemove

      @DELETE @Path("{entityName}/{key}/relation/{relationTypeKey}") public <T extends ComplexEntity> void ceRelationRemove(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("relationTypeKey") String relationTypeKey, @QueryParam("related") String relatedKey) throws ApplicationException
      DELETE: {entityName}/{key}/relation/{relationTypeKey}?related={relatedKey}

      Remove relation between entity and related entity of the relation type or all relations of the type if no related entity given.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceRelationRemove(ComplexEntity, RelationType, ComplexEntity)
    • ceRelationChangeOrder

      @POST @Path("{entityName}/{key}/{relatedKey}/relation/{relationTypeKey}/move") public <T extends ComplexEntity> void ceRelationChangeOrder(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("relatedKey") String relatedKey, @PathParam("relationTypeKey") String relationTypeKey, @QueryParam("decreaseOrder") @DefaultValue("true") boolean decreaseOrder) throws ApplicationException
      POST: {entityName}/{key}/{relatedKey}/relation/{relationTypeKey}/move?up=false

      Changes ordering of relations of the relation type of the entity by moving the related entity on place up or down in the list.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceRelationChangeOrder(ComplexEntity, ComplexEntity, RelationType, boolean)
    • ceRelationGetAttributeProfile

      @GET @Path("{entityName}/relation/{entityToEntityKey}/profile") public javax.ws.rs.core.Response ceRelationGetAttributeProfile(@PathParam("entityName") String entityName, @PathParam("entityToEntityKey") String entityToEntityKey) throws ApplicationException, IOException
      GET: {entityName}/relation/{entityToEntityKey}/profile

      Return the attribute profile (entity profile) for this relation identified by key (id) as json map. Creates a profile if none exists.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.ceRelationGetAttributeProfile(EntityToEntity)
    • ceEntityProfileApply

      @POST @Path("{entityName}/profile/{profileKey}") public <T extends ComplexEntity> void ceEntityProfileApply(@PathParam("entityName") String entityName, @PathParam("profileKey") String profileKey, @QueryParam("key") Set<String> key) throws ApplicationException
      POST: {entityName}/profile/{profileKey}?key=abc&key=dve&data=[datamap for CECopyFilter in json]

      Copy data specified in copy filter (default: all data) from entity profile onto entities

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceEntityProfileApply(List, EntityProfile, CopyFilter)
    • ceParameterGet

      @GET @Path("{entityName}/{key}/parameter") public <T extends ComplexEntity> javax.ws.rs.core.Response ceParameterGet(@PathParam("entityName") String entityName, @PathParam("key") String key) throws ApplicationException
      GET: {entityName}/{key}/parameter

      Get all entity param/data as json map

      Throws:
      ApplicationException
    • ceParameterSet

      @POST @Path("{entityName}/{key}/parameter") public <T extends ComplexEntity> javax.ws.rs.core.Response ceParameterSet(@PathParam("entityName") String entityName, @PathParam("key") String key) throws ApplicationException
      POST: {entityName}/{key}/parameter?data=[datamap with param key/value in json]

      Set all entity param/data from dataMap given as request param. to remove params set { "key" : null }

      Throws:
      ApplicationException
    • ceParameterSet

      @POST @Path("{entityName}/{key}/parameter/{paramKey}/{value}") public <T extends ComplexEntity> javax.ws.rs.core.Response ceParameterSet(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("paramKey") String paramKey, @PathParam("value") String value) throws ApplicationException
      POST: {entityName}/{key}/parameter/{paramKey}/{value}

      Set given key/value as entity param/data

      Throws:
      ApplicationException
    • ceSecondaryCollectionAdd

      @POST @Path("{entityName}/{key}/collection/{collectionKey}") public void ceSecondaryCollectionAdd(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("collectionKey") String collectionKey) throws ApplicationException
      POST: {entityName}/{key}/collection/{collectionKey}

      Add secondary collection link to entity if entity has not already an assignment (primary or secondary) to this collection.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceSecondaryCollectionAdd(ComplexEntity, Collection)
    • ceSecondaryCollectionRemove

      @DELETE @Path("{entityName}/{key}/collection/{collectionKey}") public void ceSecondaryCollectionRemove(@PathParam("entityName") String entityName, @PathParam("key") String key, @PathParam("collectionKey") String collectionKey) throws ApplicationException
      DELETE: {entityName}/{key}/collection/{collectionKey}

      Remove the collection from secondary collection assignments of the entity.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.ceSecondaryCollectionRemove(ComplexEntity, Collection)
    • ceSecondaryCollectionCopy

      @POST @Path("{entityName}/collection/{collectionKey}/copy/list") public void ceSecondaryCollectionCopy(@PathParam("entityName") String entityName, @QueryParam("key") Set<String> key, @PathParam("collectionKey") String collectionKey) throws UserException, ApplicationException
      POST: {entityName}/collection/{collectionKey}/copy/list?key=[key1]&key=[key2]&...

      Add secondary collection link to all entities of list

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.ceSecondaryCollectionCopy(List, Collection)
    • ceSecondaryCollectionMove

      @POST @Path("{entityName}/source/{sourceKey}/target/{targetKey}/move/list") public void ceSecondaryCollectionMove(@PathParam("entityName") String entityName, @QueryParam("key") Set<String> key, @PathParam("sourceKey") String sourceKey, @PathParam("targetKey") String targetKey) throws UserException, ApplicationException
      POST: {entityName}/source/{sourceKey}/target/{targetKey}/move/list?key=[key1]&key=[key2]&...

      Replace secondary collection link (target for source) for all entities of list

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.ceSecondaryCollectionMove(List, Collection, Collection)
    • nodeBasketGet

      @GET @Path("nodebasket/{basketKey}") public javax.ws.rs.core.Response nodeBasketGet(@PathParam("basketKey") String basketKey) throws ApplicationException, IOException
      GET: nodebasket/{basketKey}

      Get a node basket. Returns error if basket is not a node basket

      Throws:
      ApplicationException
      IOException
      See Also:
      • BaseRI#getFromKey(String, String)
    • nodeBasketGetActiveForUser

      @GET @Path("nodebasket/active") public javax.ws.rs.core.Response nodeBasketGetActiveForUser() throws ApplicationException, IOException
      GET: nodebasket/active

      Get the currently active node basket for the logged-in user.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeBasketActiveForUser()
    • nodeBasketSetActive

      @POST @Path("nodebasket/{basketKey}/active") public void nodeBasketSetActive(@PathParam("basketKey") String basketKey) throws ApplicationException
      POST: nodebasket/{basketKey}/active

      Set the node basket given by key as active for the logged-in user

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketSetActive(Basket basket)
    • nodeBasketToggleLock

      @POST @Path("nodebasket/{basketKey}/togglelock") public void nodeBasketToggleLock(@PathParam("basketKey") String basketKey) throws ApplicationException
      POST: nodebasket/{basketKey}/togglelock

      Change lock flag for basket

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketToggleLock(Basket basket)
    • nodeBasketAddNode

      @POST @Path("nodebasket/{basketKey}/node/{nodeKey}") public void nodeBasketAddNode(@PathParam("basketKey") String basketKey, @PathParam("nodeKey") String nodeKey) throws ApplicationException
      POST: nodebasket/{basketKey}/node/{nodeKey}

      Add node to node basket

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketAddNode(Basket basket, Node asset)
    • nodeBasketAddNodeList

      @POST @Path("nodebasket/{basketKey}/node/list") public void nodeBasketAddNodeList(@PathParam("basketKey") String basketKey, @QueryParam("nodeKey") Set<String> nodeKey) throws ApplicationException
      POST: nodebasket/{basketKey}/node/list?nodeKey=[key1]&nodeKey=[key2]...

      Add list of nodes to node basket

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketAddNodes(Basket basket, List nodes)
    • nodeBasketRemoveNode

      @DELETE @Path("nodebasket/{basketKey}/node/{nodeKey}") public void nodeBasketRemoveNode(@PathParam("basketKey") String basketKey, @PathParam("nodeKey") String nodeKey) throws ApplicationException
      DELETE: nodebasket/{basketKey}/node/{nodeKey}

      Remove node from node basket

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketRemoveNode(Basket basket, Node node)
    • nodeBasketRemoveNodes

      @DELETE @Path("nodebasket/{basketKey}/node/list") public void nodeBasketRemoveNodes(@PathParam("basketKey") String basketKey, @QueryParam("nodeKey") Set<String> nodeKey) throws ApplicationException
      DELETE: nodebasket/{basketKey}/asset/list?nodeKey=[key1]&nodeKey=[key2]...

      Remove list of node from node basket

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketRemoveNodes(Basket basket, List asset)
    • nodeBasketInsert

      @POST @Path("nodebasket") public javax.ws.rs.core.Response nodeBasketInsert() throws UserException, ApplicationException, IOException
      POST: nodebasket?data=[jsonDataMap]

      Insert a new empty node basket with data provided in the json data map and set it as active

      Throws:
      UserException
      ApplicationException
      IOException
    • nodeBasketInsert

      @POST @Path("nodebasket/node/list") public javax.ws.rs.core.Response nodeBasketInsert(@QueryParam("nodeKey") Set<String> nodeKey) throws ApplicationException, IOException
      POST: nodebasket/node/list?nodeKey=[key1]&nodeKey=[key2]...

      Create a new node basket containing the nodes and set it as the active basket

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.nodeBasketInsert(List node)
    • nodeBasketEdit

      @POST @Path("nodebasket/{basketKey}") public javax.ws.rs.core.Response nodeBasketEdit(@PathParam("basketKey") String basketKey) throws UserException, ApplicationException, IOException
      POST: nodebasket/{basketKey}?data=[jsonDataMap]

      Save changes to a base data of node basket with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
    • nodeBasketDelete

      @DELETE @Path("nodebasket/{basketKey}") public void nodeBasketDelete(@PathParam("basketKey") String basketKey) throws ApplicationException
      DELETE: nodebasket/{basketKey}

      Delete the node basket if own, otherwise remove shared link from logged-in user

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketDelete(Basket basket)
    • nodeBasketAddReceiver

      @POST @Path("nodebasket/{basketKey}/principal/{principalKey}") public void nodeBasketAddReceiver(@PathParam("basketKey") String basketKey, @PathParam("principalKey") String principalKey) throws UserException, ApplicationException
      POST: nodebasket/{basketKey}/principal/{principalKey}

      Add receiver for a shared node basket

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.nodeBasketAddReceiver(Basket basket, Principal principal)
    • nodeBasketRemoveReceiver

      @DELETE @Path("nodebasket/{basketKey}/principal/{principalKey}") public void nodeBasketRemoveReceiver(@PathParam("basketKey") String basketKey, @PathParam("principalKey") String principalKey) throws UserException, ApplicationException
      DELETE: nodebasket/{basketKey}/principal/{principalKey}

      Remove receiver from a shared node basket

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI#nodeBasketRemoveReceiver(Basket basket, Principal principal)
    • attributeInsert

      @POST @Path("attribute") public javax.ws.rs.core.Response attributeInsert() throws UserException, ApplicationException, IOException
      POST: attribute?data=[jsonDataMap]

      Insert a new attribute with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.attributeSave(Attribute, DataMap)
    • attributeEdit

      @POST @Path("attribute/{key}") public javax.ws.rs.core.Response attributeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: attribute/{key}?data=[jsonDataMap]

      Save changes to a attribute with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.attributeSave(Attribute, DataMap)
    • attributeDelete

      @DELETE @Path("attribute/{key}") public void attributeDelete(@PathParam("key") String key, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException
      DELETE: attribute/{key}?force=false

      Delete an attribute with children. Force is required to delete a attribute with dependencies and/or children

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.attributeDelete(Attribute, boolean)
    • attributeCopy

      @POST @Path("attribute/{key}/copy") public javax.ws.rs.core.Response attributeCopy(@PathParam("key") String key, @QueryParam("collection") String collectionKey) throws UserException, ApplicationException, IOException
      POST: attribute/{key}/copy?collection={collectionKey}

      Copy attribute defined by key to a new collection if given by collectionKey, otherwise to same collection as source attribute.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.attributeCopy(Attribute, Collection)
    • attributeDefaultValueSet

      @POST @Path("attribute/{key}/defaultvalue") public void attributeDefaultValueSet(@PathParam("key") String key) throws UserException, ApplicationException
      POST: attribute/{key}/defaultvalue?data=[jsonDataMap]

      Update or insert default value of the attribute with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI#attributeDefaultValueSet(Attribute, DataMap)
    • attributeSampleValueSet

      @POST @Path("attribute/{key}/samplevalue") public void attributeSampleValueSet(@PathParam("key") String key) throws UserException, ApplicationException
      POST: attribute/{key}/samplevalue?data=[jsonDataMap]

      Update or insert sample value of the attribute with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI#attributeSampleValueSet(Attribute, DataMap)
    • attributeDefaultValueDelete

      @DELETE @Path("attribute/{key}/defaultvalue") public void attributeDefaultValueDelete(@PathParam("key") String key) throws ApplicationException, UserException
      DELETE: attribute/{key}/defaultvalue?data=[jsonDataMap]

      Remove the default value of the attribute

      Throws:
      ApplicationException
      UserException
      See Also:
      • GenericAPI.attributeDefaultValueDelete(Attribute)
    • attributeSampleValueDelete

      @DELETE @Path("attribute/{key}/samplevalue") public void attributeSampleValueDelete(@PathParam("key") String key) throws ApplicationException, UserException
      DELETE: attribute/{key}/samplevalue?data=[jsonDataMap]

      Remove the sample value of the attribute

      Throws:
      ApplicationException
      UserException
      See Also:
      • GenericAPI.attributeSampleValueDelete(Attribute)
    • attributeStandardValueInsert

      @POST @Path("attribute/{key}/standardvalue") public void attributeStandardValueInsert(@PathParam("key") String key) throws UserException, ApplicationException
      POST: attribute/{key}/standardvalue?data=[jsonDataMap]

      Insert a standard value with data from jsonDataMap. The valueType is ValueType.SHARED (enumeration attribute).

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI#attributeStandardValueEdit(Attribute, DataMap)
    • attributeStandardValueEdit

      @POST @Path("attribute/{key}/standardvalue/{datavaluesetkey}") public void attributeStandardValueEdit(@PathParam("key") String key, @PathParam("datavaluesetkey") String datavalueSetKey) throws UserException, ApplicationException
      POST: attribute/{key}/standardvalue/{datavaluesetkey}?data=[jsonDataMap]

      Update the standard value with data from jsonDataMap.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI#attributeStandardValueEdit(Attribute, DataMap)
    • attributeStandardValueRemoveValue

      @DELETE @Path("attribute/{key}/standardvalue/value/{datavaluekey}") public void attributeStandardValueRemoveValue(@PathParam("key") String key, @PathParam("datavaluekey") String datavalueKey, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException
      DELETE: attribute/{key}/standardvalue/value/{datavaluekey}?force=false

      Remove the locale value from the standardValue of attribute

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.attributeStandardValueRemoveValue(Attribute, DataValue, boolean)
    • attributeStandardValueDelete

      @DELETE @Path("attribute/{key}/standardvalue/{datavaluesetkey}") public void attributeStandardValueDelete(@PathParam("key") String key, @PathParam("datavaluesetkey") String datavaluesetkey, @QueryParam("force") @DefaultValue("false") boolean force) throws UserException, ApplicationException
      DELETE: attribute/{key}/standardvalue/{datavaluesetkey}?force=false

      Remove the standardValue of attribute

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.attributeStandardValueDelete(Attribute, DataValueSet, boolean)
    • attributeTypeInsert

      @POST @Path("attributetype") public javax.ws.rs.core.Response attributeTypeInsert() throws UserException, ApplicationException, IOException
      POST: attributetype?data=[datamap in json]

      Insert a new attribute type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.attributeTypeSave(AttributeType, DataMap)
    • attributeTypeEdit

      @POST @Path("attributetype/{key}") public javax.ws.rs.core.Response attributeTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: attributetype/{key}?data=[datamap in json]

      Save changes to the attribute type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.attributeTypeSave(AttributeType, DataMap)
    • attributeTypeDelete

      @DELETE @Path("attributetype/{key}") public void attributeTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException
      DELETE: attributetype/{key}

      Delete an attribute type if not in use.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.attributeTypeDelete(AttributeType)
    • collectionInsert

      @POST @Path("collection") public javax.ws.rs.core.Response collectionInsert() throws UserException, ApplicationException, IOException
      POST: collection?data=[jsonDataMap]

      Insert collection by setting its fields from given dataMap.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.collectionSave(Collection, DataMap)
    • collectionEdit

      @POST @Path("collection/{key}") public javax.ws.rs.core.Response collectionEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: collection/{key}?data=[jsonDataMap]

      Save changes to collection from data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.collectionSave(Collection, DataMap)
    • collectionDelete

      @DELETE @Path("collection/{key}") public void collectionDelete(@PathParam("key") String key) throws UserException, ApplicationException
      DELETE: collection/{key}

      Delete the collection with all child collections and all contained elements

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.collectionDelete(Collection)
    • collectionCopy

      @POST @Path("collection/{key}/copy") public javax.ws.rs.core.Response collectionCopy(@PathParam("key") String key, @QueryParam("parentcollection") String parentCollectionKey) throws ApplicationException, IOException
      POST: collection/{key}/copy?parentcollection={parentCollectionKey}

      Copy the collection (deep copy) to parent collection if given otherwise to parent collection of the original collection

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.collectionCopy(Collection, Collection)
    • collectionMove

      @POST @Path("collection/{key}/move/{parentcollection}") public void collectionMove(@PathParam("key") String key, @PathParam("parentcollection") String parentCollectionKey) throws ApplicationException
      POST: collection/{key}/move/{parentcollection}

      Move the collection to the parent collection with all children and contained objects

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.collectionMove(Collection, Collection)
    • collectionManagedMove

      @POST @Path("{entityName}/collection/{collectionkey}/move") public <T extends ICollectionManaged> void collectionManagedMove(@PathParam("entityName") String entityName, @QueryParam("key") Set<String> key, @PathParam("collectionkey") String collectionKey) throws UserException, ApplicationException
      POST: {entityName}/collection/{collectionkey}/move?key=abc&key=def...
      QueryParam: key is mandatory

      Move list of collection managed entities to given collection.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.collectionManagedMove(List, Collection)
    • collectionGetRoot

      @GET @Path("{entityName}/{key}/collection/root") public <T extends ICollectionManaged> javax.ws.rs.core.Response collectionGetRoot(@PathParam("entityName") String entityName, @PathParam("key") String key) throws UserException, ApplicationException, IOException
      GET: {entityName}/{key}/collection/root

      Get the root collection for the entity, must be ICollectionManaged

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.collectionGetRoot(ICollectionManaged)
    • collectionGetRootFromClass

      @GET @Path("{entityName}/collection/root") public javax.ws.rs.core.Response collectionGetRootFromClass(@PathParam("entityName") String entityName) throws UserException, ApplicationException, IOException
      GET: {entityName}/collection/root

      Get the root collection for the entity class, must be ICollectionManaged

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.collectionGetRoot(ICollectionManaged)
    • entityProfileInsert

      @POST @Path("entityprofile") public javax.ws.rs.core.Response entityProfileInsert() throws ApplicationException, IOException
      POST: entityprofile?data=[datamap in json]

      Insert a new entity profile with data provided in the json data map.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.entityProfileSave(EntityProfile, DataMap)
    • entityProfileEdit

      @POST @Path("entityprofile/{key}") public javax.ws.rs.core.Response entityProfileEdit(@PathParam("key") String key) throws ApplicationException, IOException
      POST: entityprofile/{key}?data=[datamap in json]

      Save changes to the entity profile with data provided in the json data map.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.entityProfileSave(EntityProfile, DataMap)
    • entityProfileDelete

      @DELETE @Path("entityprofile/{key}") public void entityProfileDelete(@PathParam("key") String key) throws DeleteTiedElementException, UserException, ApplicationException
      DELETE: entityprofile/{key}

      Delete the entity profile if not in use.

      Throws:
      DeleteTiedElementException
      UserException
      ApplicationException
      See Also:
      • GenericAPI.entityProfileDelete(EntityProfile)
    • entityProfilesGet

      @GET @Path("{entityName}/entityprofile") public javax.ws.rs.core.Response entityProfilesGet(@PathParam("entityName") String entityName) throws ApplicationException, IOException
      GET: {entityName}/entityprofile

      Return a list of entity profiles for this entity type.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.entityProfilesGet(Class)
    • entityProfileCreate

      @POST @Path("{entityName}/{key}/entityprofile/create") public javax.ws.rs.core.Response entityProfileCreate(@PathParam("entityName") String entityName, @PathParam("key") String key) throws ApplicationException, IOException
      POST: {entityName}/{key}/entityprofile/create

      Creates a new entity profile from source entity and data in dataMap

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.entityProfileCreate(EntityProfile, ComplexEntity, DataMap)
    • entityProfileCollectionAdd

      @POST @Path("entityprofile/{key}/collection/{collectionkey}") public void entityProfileCollectionAdd(@PathParam("key") String key, @PathParam("collectionkey") String collectionKey) throws ApplicationException
      POST: entityprofile/{key}/collection/{collectionkey}

      add a secondary collection to entity profile

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.entityProfileCollectionAdd(EntityProfile, Collection)
    • entityProfileCollectionChangeOrder

      @POST @Path("entityprofile/{key}/collection/{collectionkey}/move") public void entityProfileCollectionChangeOrder(@PathParam("key") String key, @PathParam("collectionkey") String collectionKey, @QueryParam("up") @DefaultValue("true") boolean decreaseOrder) throws ApplicationException
      POST: entityprofile/{key}/collection/{collectionkey}/move?up=false

      change place of collection in list of secondary collections of entityProfile

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.entityProfileCollectionChangeOrder(EntityProfile, Collection, boolean)
    • entityProfileTypeForCollectionGet

      @GET @Path("entityprofiletype/collection") public javax.ws.rs.core.Response entityProfileTypeForCollectionGet() throws ApplicationException, IOException
      GET: entityprofiletype/collection

      Return the EntityProfileType for collections.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.entityProfileTypeForCollection()
    • entityProfileTypeForRelationTypeGet

      @GET @Path("entityprofiletype/relationtype/{key}") public javax.ws.rs.core.Response entityProfileTypeForRelationTypeGet(@PathParam("key") String key, @QueryParam("create") @DefaultValue("false") boolean create) throws ApplicationException, IOException
      GET: entityprofiletype/relationtype/{key}

      Return the EntityProfileType for this relationType.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.entityProfileTypeForRelationType(RelationType, boolean)
    • permissionProfilesGet

      @GET @Path("permissionprofiles") public javax.ws.rs.core.Response permissionProfilesGet() throws ApplicationException, IOException
      GET: permissionprofiles

      Return a list of permission profiles.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI#permissionProfilesGet()
    • relationTypeInsert

      @POST @Path("relationtype") public javax.ws.rs.core.Response relationTypeInsert() throws UserException, ApplicationException, IOException
      POST: relationtype?data=[jsonDataMap]

      Insert a new relation type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.relationTypeSave(RelationType, DataMap)
    • relationTypeEdit

      @POST @Path("relationtype/{key}") public javax.ws.rs.core.Response relationTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: relationtype/{key}?data=[jsonDataMap]

      Save changes to a relation type with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.relationTypeSave(RelationType, DataMap)
    • relationTypeDelete

      @DELETE @Path("relationtype/{key}") public void relationTypeDelete(@PathParam("key") String key) throws ApplicationException
      DELETE: relationtype/{key}

      Delete the relation type if not in use.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.relationTypeDelete(RelationType)
    • relationTypeCopy

      @POST @Path("relationtype/{key}/copy") public javax.ws.rs.core.Response relationTypeCopy(@PathParam("key") String key) throws ApplicationException, IOException
      POST: relationtype/{key}/copy

      Create a copy of the relation type.

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.relationTypeCopy(RelationType)
    • relationTypeGetComplexEntityTypes

      @GET @Path("relationtype/{key}/{entityName}/{typeKey}") public javax.ws.rs.core.Response relationTypeGetComplexEntityTypes(@PathParam("key") String key, @PathParam("entityName") String entityName, @PathParam("typeKey") String typeKey) throws ApplicationException, IOException
      GET: relationtype/{key}/{entityName}/{typeKey}

      Return the complex type entity(s) of other side of relation for this complex type entity

      Throws:
      ApplicationException
      IOException
      See Also:
      • GenericAPI.relationTypeGetComplexEntityTypes(RelationType, ComplexTypeEntity)
    • classificationInsert

      @POST @Path("classification") public javax.ws.rs.core.Response classificationInsert() throws UserException, ApplicationException, IOException
      POST: classification?data=[jsonDataMap]

      Insert a new classification with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.classificationSave(Classification, DataMap)
    • classificationEdit

      @POST @Path("classification/{key}") public javax.ws.rs.core.Response classificationEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: classification/{key}?data=[jsonDataMap]

      Save changes to a classification with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.classificationSave(Classification, DataMap)
    • classificationDelete

      @DELETE @Path("classification/{key}") public void classificationDelete(@PathParam("key") String key, @QueryParam("force") boolean force) throws UserException, ApplicationException
      DELETE: classification/{key}?force=false

      Delete an classification with children.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI.classificationDelete(Classification, boolean)
    • classificationAttributeAdd

      @POST @Path("classification/{key}/attributes/add") public <T extends ComplexEntity> void classificationAttributeAdd(@PathParam("key") String key, @QueryParam("attributeKey") Set<String> attributeKey, @QueryParam("byCollection") @DefaultValue("true") boolean byCollection) throws ApplicationException
      POST: classification/{key}/attributes/add?attributeKey=[key1]&attributeKey=[key2]&byCollection=false

      Assigns a list of (object) attributes to this complex entity if not already assigned.

      Throws:
      ApplicationException
      See Also:
      • GenericAPI#classificationAttributeAdd(Classification, List)
    • classificationAttributesSetMandatory

      @POST @Path("classification/{key}/attributes/setmandatory") public <T extends ComplexEntity> void classificationAttributesSetMandatory(@PathParam("key") String key, @QueryParam("attributeKey") Set<String> attributeKey) throws ApplicationException
      POST: classification/{key}/attributes/setmandatory?attributeKey=[key1]&attributeKey=[key2]

      Sets all assigned attributes that are in given list to mandatory, all other assigned attributes to not mandatory

      Throws:
      ApplicationException
      See Also:
      • GenericAPI.classificationAttributesSetMandatory(Classification, List)
    • classificationHrcInsert

      @POST @Path("classificationHrc") public javax.ws.rs.core.Response classificationHrcInsert() throws UserException, ApplicationException, IOException
      POST: classificationHrc?data=[jsonDataMap]

      Insert a new classificationHrc with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.classificationHrcSave(ClassificationHrc, DataMap)
    • classificationHrcEdit

      @POST @Path("classificationHrc/{key}") public javax.ws.rs.core.Response classificationHrcEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: classificationHrc/{key}?data=[jsonDataMap]

      Save changes to a classificationHrc with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • GenericAPI.classificationHrcSave(ClassificationHrc, DataMap)
    • classificationHrcDelete

      @DELETE @Path("classificationHrc/{key}") public void classificationHrcDelete(@PathParam("key") String key) throws UserException, ApplicationException
      DELETE: classificationHrc/{key}

      Delete an classificationHrc with children.

      Throws:
      UserException
      ApplicationException
      See Also:
      • GenericAPI#classificationHrcDelete(ClassificationHrc, boolean)
    • nodeSave

      public Node nodeSave(Node node, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given Node by setting its fields from given dataMap, if permission and state check allow to do so. If Node is new the NodeType id and the NodeHrc id must be provided and permission check is for INSERT either on parent if parent id is provided, otherwise (first level node) on NodeHrc. Check on edit state is on parent if not first level node. If Node is persistent NodeType and NodeHrc must be set as attached entities. Permission check is on Node itself with right EDIT if content locale is the master locale of the node, otherwise TRANSLATE. State check is on Node as well.
      Parameters:
      node - mandatory
      dataMap - mandatory, contains values for the Node's fields as key-value pairs
      Returns:
      inserted or updated Node. If Node has been inserted if contains now the newly created id
      Throws:
      UserException - if permission or edit state missing.
      ApplicationException
    • nodeDelete

      public void nodeDelete(Node node, boolean force) throws UserException, ApplicationException
      Checks if Node is referenced by NavigationToNode. Also checks relations in which this node participates. Relations with dependency type EQUAL will be deleted. Relations with dependency type MASTER will be deleted if this Node is the master node (entity1 of relation). If this node is the dependent node (entity2 of relation) a UserException with message key message.object.error.relationwill be thrown. If checks ok removes node from database. All children and their children and so on will be deleted by cascade Remove. Permission check if for DELETE on this node.
      Parameters:
      node - mandatory
      force - if true also deletes node when referenced and removes the references
      Throws:
      UserException - if Node is in use.
      ApplicationException
      See Also:
      • for usage of Node CHECK: validateNotUsed should be also called for children CHECK: relations should also be checked for children
    • nodeDelete

      public void nodeDelete(List<Node> nodes, boolean force) throws UserException, ApplicationException
      Delete List of nodes in a asynchronous background process. forced delete: existing references are removed
      Parameters:
      nodes - mandatory
      force - optional, default is false
      if true also deletes node when referenced and removes the references
      Throws:
      UserException
      ApplicationException
    • nodeCopy

      public Node nodeCopy(Node sourceNode, Node parentForCopy) throws ApplicationException
      Copies node. Same as nodeCopy(Node, Node, NodeCopyFilter) with copyFilter null
      Parameters:
      sourceNode - mandatory
      parentForCopy - optional, parent Node onto which this node should be copied. If null uses parent of source node
      Returns:
      the copy
      Throws:
      ApplicationException
    • nodeCopy

      public Node nodeCopy(Node sourceNode, Node parentForCopy, NodeCopyFilter copyFilter) throws ApplicationException
      Copies node to parentNode if given and nodeType not root node type. If parentNode == null and nodeType is not root node type copies node to parent of source node. If node type is root node type copies node as root node in NodeHrc of source node
      Parameters:
      sourceNode - mandatory
      parentForCopy - optional, parent Node onto which this node should be copied. If null uses parent of source node
      copyFilter - optional, uses default copy settings if null
      Returns:
      the copy
      Throws:
      ApplicationException
    • nodeMove

      public Node nodeMove(Node node, Node parentNode) throws ApplicationException
      Moves node to parentNode with given id.
      Parameters:
      node - mandatory, must be attached
      parentNode - mandatory, must be node that has the same nodeType as the current parent node
      Returns:
      this node
      Throws:
      ApplicationException
    • nodePreview

      public void nodePreview(Node node, String format, String templateName, OutputStream os) throws ApplicationException
      Write preview of node to output stream in given format using export/publish framework.
      Parameters:
      node - mandatory
      format - optional, PublishFormat as String. default is PDF
      templateName - optional, mandatory only for HTML format. the name of template file in namespace folder.
      os - mandatory, output stream for writing result
      Throws:
      ApplicationException
    • nodeArchivedSearch

      public mc.core.system.util.misc.Pair<List<Node>,mc.core.system.search.SearchResult> nodeArchivedSearch()
      search all archived entities for current user (where current user is entityOwner)
      Returns:
      pair of first result page and SearchResult to retrieve further results
    • nodeArchive

      public void nodeArchive(Node node) throws UserException
      mark node and all children nodes as "in archive". node maybe filtered in DB or FTI queries, but keeps all data and references.
      permission: RightType.EDIT
      Parameters:
      node - mandatory
      Throws:
      UserException - on missing permission
      or wf started message on user by too many children (async case)
    • nodeArchiveRestore

      public void nodeArchiveRestore(Node node) throws UserException
      restore an node and all children nodes from archive.
      permission: RightType.EDIT
      visibility: check visibility on parent
      Parameters:
      node - mandatory
      Throws:
      UserException - on missing permission
      or wf started message on user by too many children (async case)
    • nodeAddClassification

      public void nodeAddClassification(Node node, Classification classification) throws ApplicationException
      Adds Classification to given Node if not already exist.
      permission: RightType.EDIT and edit allowed STATE by node

      Parameters:
      node - mandatory
      classification - mandatory
      Throws:
      ApplicationException
    • nodeRemoveClassification

      public void nodeRemoveClassification(Node node, Classification classification, boolean removeClassificationAttributes) throws ApplicationException
      Removes Classification from given Node.
      If removeClassificationAttributes is true also removes the EntityToAttributes of the Node of the Attributes that are the Classification's Attributes.
      permission: RightType.EDIT and edit allowed STATE by node

      Parameters:
      node - mandatory
      classification - mandatory
      removeClassificationAttributes - boolean
      Throws:
      ApplicationException
    • nodeTypeSave

      public NodeType nodeTypeSave(NodeType nodeType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given NodeType by setting its fields from given dataMap.
      Parameters:
      nodeType - mandatory
      dataMap - mandatory, contains values for the NodeType's fields as key-value pairs
      Returns:
      inserted or updated NodeType. If NodeType has been inserted if contains now the newly created id
      Throws:
      UserException - is user has not role CONFIGADMIN
      ApplicationException
    • nodeTypeDelete

      public void nodeTypeDelete(NodeType nodeType) throws UserException, ApplicationException
      Checks if NodeType is referenced by Node, AssetPipeline, ChannelMapField, RelationType, NavigationType. If not removes NodeType from database.
      Parameters:
      nodeType - mandatory
      Throws:
      UserException - if NodeType is in use.
      ApplicationException
      See Also:
      • for usage of NodeType
    • ctRemoveAttribute

      public void ctRemoveAttribute(ComplexTypeEntity complexTypeEntity, Attribute attribute, boolean force) throws UserException, DeleteTiedElementException, ApplicationException
      removes assigned Attribute from the type attributes of this ComplexTypeEntity
      user role: only UserBaseRole.CONFIGADMIN but not for publication profile types

      Parameters:
      complexTypeEntity - mandatory
      attribute - Attribute, mandatory
      force - not yet implemented, Attribute is always removed. Should be: if false only removes this type Attribute if there are no ComplexEntity of this ComplexTypeEntity that have values for this Attribute, otherwise throws DeleteTiedElementException
      Throws:
      UserException - if user has not role config admin
      DeleteTiedElementException - not yet implemented
      ApplicationException
    • ctRemoveAttributeType

      public void ctRemoveAttributeType(ComplexTypeEntity complexTypeEntity, AttributeType attributeType, boolean force) throws UserException, DeleteTiedElementException
      removes assigned AttributeType from allowed AttributeTypes of this ComplexTypeEntity
      user role: only UserBaseRole.CONFIGADMIN

      Parameters:
      complexTypeEntity - mandatory
      attributeType - AttributeType, mandatory
      force - not yet implemented, attributeType is always removed. Should be: if false only removes AttributeType if there are no ComplexEntity of this ComplexTypeEntity that have Attributes of this AttributeType, otherwise throws DeleteTiedElementException
      Throws:
      UserException - if user has not role config admin
      DeleteTiedElementException
    • nodeHrcSave

      public NodeHrc nodeHrcSave(NodeHrc nodeHrc, DataMap dataMap) throws UserException, ApplicationException
      Checks if user has right EDIT if content locale is master locale of NodeHrc, otherwise right TRANSLATE. if right check is ok updates given NodeHrc by setting its fields from given dataMap. The only way to insert a NodeHrc is by creating a NodeHrcType, so nodeHrcSave is not used for insert.
      Parameters:
      nodeHrc - mandatory
      dataMap - mandatory, contains values for the NodeHrc's fields as key-value pairs
      Throws:
      UserException - if user has not the required right
      ApplicationException
    • nodeHrcTypeSave

      public NodeHrcType nodeHrcTypeSave(NodeHrcType nodeHrcType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given NodeHrcType by setting its fields from given dataMap. If the NodeHrcType is inserted also inserts a NodeHrc for this NodeHrcType. There is always only one NodeHrc per NodeHrcType.
      Parameters:
      nodeHrcType - mandatory
      dataMap - mandatory, contains values for the NodeHrcType's fields as key-value pairs
      Returns:
      inserted or updated NodeHrcType.
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • nodeHrcTypeDelete

      public void nodeHrcTypeDelete(NodeHrcType nodeHrcType) throws DeleteTiedElementException, ApplicationException
      Checks if NodeHrcType is referenced by NavigationHrcType and if any of the NodeTypes of this NodeHrcType are referenced. If not removes NodeHrcType and the corresponding NodeHrc from database.
      Parameters:
      nodeHrcType - mandatory
      Throws:
      DeleteTiedElementException - if NodeHrcType is in use.
      ApplicationException
      See Also:
      • for usage of NodeType (same check as in nodeTypeDelete)
    • relationTypeSave

      public RelationType relationTypeSave(RelationType relationType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given RelationType by setting its fields from given dataMap. DataMap must have references to a complexEntity for entity1 and at least one for entities2. Currently only relations of Nodes with Nodes and Assets with Assets are supported.
      Parameters:
      relationType - mandatory
      dataMap - mandatory, contains values for the RelationType's fields as key-value pairs
      Returns:
      inserted or updated RelationType.
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • relationTypeDelete

      public void relationTypeDelete(RelationType relationType) throws DeleteTiedElementException, ApplicationException
      Checks if RelationType is referenced by EntityToEntity (existing Relations) or ChannelMapField. If not removes RelationType from database.
      Parameters:
      relationType - mandatory
      Throws:
      DeleteTiedElementException - if RelationType is in use.
      ApplicationException
      See Also:
      • for usage of RelationType
    • relationTypeCopy

      public RelationType relationTypeCopy(RelationType relationType) throws UserException, ApplicationException
      Creates a copy of this RelationType.
      Parameters:
      relationType - mandatory
      Returns:
      the copy
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • relationTypeGetComplexEntityTypes

      public List<ComplexTypeEntity> relationTypeGetComplexEntityTypes(RelationType relationType, ComplexTypeEntity complexType) throws ApplicationException
      Returns the ComplexEntityType(s) of other side of relation for this ComplexEntityType (can be TypeEntity1 or in TypeEntities2).
      Parameters:
      relationType - mandatory
      complexType - mandatory, must either in list RelationType.getTypeEntities1() or in list returned by RelationType.getTypeEntities2()
      Returns:
      List that contains at least one ComplexEntityType
      Throws:
      ApplicationException
    • entityProfileTypeForRelationType

      public EntityProfileType entityProfileTypeForRelationType(RelationType relationType, boolean create) throws ApplicationException
      Returns the EntityProfileType for this relationType. If it does not exist and create=true it is created.
      Parameters:
      relationType - mandatory
      create - if true creates the EntityProfileType
      Returns:
      EntityProfileType
      Throws:
      ApplicationException
    • attributeSave

      public Attribute attributeSave(Attribute attribute, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given Attribute by setting its fields from given dataMap. AttributeType must always be provided, either as attached entity in member field of Attribute or as valid reference in dataMap. If the AttributeType's subtype is not OBJECTS_STATIC also the DataType for values must be provided in the same way as the AttributeType.
      Case Insert: If AttributeType's subtype is TYPES or PRESENTATION Attribute must have an internalDescription. If not provided an unique internalDescription is generated. If no collection is provided the Attribute will be inserted in the root collection of its AttributeType.
      Case Update: checks for permission EDIT and edit state and calls setModified for EDIT.
      Parameters:
      attribute - mandatory
      dataMap - mandatory, contains values for the Attribute's fields as key-value pairs
      Returns:
      the inserted or updated Attribute
      Throws:
      UserException - if permission or state check fail. If settings within attribute are incompatible. As a warning that fti index configuration is reinitialized in case fulltext search relevant settings have been changed.
      ApplicationException
    • attributeDelete

      public void attributeDelete(Attribute attribute, boolean force) throws UserException, ApplicationException
      Checks if Attribute is referenced by TypeEntityToAttribute, EntityToAttribute, ClassificationToAttribute, AssetPipeline or ChannelMapField. If not calls setModified for DELETE and removes Attribute from database.
      Parameters:
      attribute - mandatory
      force - if true deletes Attribute even if it is assigned to ComplexTypeEntity as type attribute, to ComplexEntity or to Classification. Also deletes the assignments.
      Throws:
      UserException - if Attribute is in use or if User lacks right DELETE.
      ApplicationException
    • attributeCopy

      public Attribute attributeCopy(Attribute sourceAttribute, Collection targetCollection) throws ApplicationException
      Copies attribute to collection if given, otherwise to collection of sourceAttribute.
      Parameters:
      sourceAttribute - mandatory
      targetCollection - optional
      Returns:
      the copy
      Throws:
      UserException - if user has not right INSERT on target collection
      ApplicationException
    • attributeDefaultValueSet

      public void attributeDefaultValueSet(DataValueTO dvTO) throws UserException, ApplicationException
      Updates or inserts defaultValue for given Attribute. The DataValueTO must provide data appropriate to the dataTypeForValue of the Attribute (see setXXXValue-methods of DataValueTO or Field-enums of DataValue-subclasses when using the DataMap wrapped in DataValueTO directly).
      Calls setModified for EDIT for this Attribute. Checks for permission EDIT and edit state of the Attribute
      Parameters:
      dvTO - mandatory, must contain the attribute and data to insert or update the default value of the attribute
      Throws:
      UserException
      ApplicationException
    • attributeSampleValueSet

      public void attributeSampleValueSet(DataValueTO dvTO) throws UserException, ApplicationException
      Updates or inserts sampleValue for given Attribute. The DataValueTO must provide data appropriate to the dataTypeForValue of the Attribute (see setXXXValue-methods of DataValueTO or Field-enums of DataValue-subclasses when using the DataMap wrapped in DataValueTO directly).
      Calls setModified for EDIT for this Attribute. Checks for permission EDIT and edit state of the Attribute
      Parameters:
      dvTO - mandatory, must contain the attribute and data to insert or update the sample value of the attribute
      Throws:
      UserException
      ApplicationException
    • attributeDefaultValueDelete

      public void attributeDefaultValueDelete(Attribute attribute) throws ApplicationException, UserException
      Removes the default value (if exists) of given attribute and deletes the complete value.
      Parameters:
      attribute - mandatory
      Throws:
      ApplicationException
      UserException
    • attributeSampleValueDelete

      public void attributeSampleValueDelete(Attribute attribute) throws ApplicationException, UserException
      Removes the sample value (if exists) of given attribute and deletes the complete value.
      Parameters:
      attribute - mandatory
      Throws:
      UserException
      ApplicationException
    • attributeStandardValuesEdit

      public void attributeStandardValuesEdit(Attribute attribute, List<DataValueTO> dvTOList) throws UserException, ApplicationException
      Edits or inserts values, each represented by a dataMap, as standard or proposal value of attribute. if value is already persistent it must have its dataValueSet (id or key) in map and the dataValueSet must be part of the attribute set. If new the map must contain the valueType (ValueType.SHARED or ValueType.PROPOSAL). The DataValueSet will be inserted. ordering will not be changed - new values are inserted with prio 0. locale is set: either undefinedLocale if localeIndependent, given locale or if null the current ContentLocale
      Parameters:
      attribute - mandatory
      dvTOList - list of DataValueTOs, mandatory
      Throws:
      UserException
      ApplicationException
    • attributeStandardValueEdit

      public void attributeStandardValueEdit(DataValueTO dvTO) throws UserException, ApplicationException
      Edits or inserts the value represented by the DataValueTO as standard or proposal value of attribute. The DataValueTO must contain the attributes. If value is already persistent the dataValueSet (id or key) must be present in DataValueTO and the dataValueSet must be part of the attribute standard values. If new the DataValueTO must contain the valueType (ValueType.SHARED or ValueType.PROPOSAL). The DataValueSet will be inserted. ordering will not be changed - new values are inserted with prio 0. locale is set: either undefinedLocale if localeIndependent, given locale or if null the current ContentLocale
      Parameters:
      dvTO - DataValueTO mandatory, must contain the attribute
      Throws:
      UserException
      ApplicationException
    • attributeStandardValueRemoveValue

      public void attributeStandardValueRemoveValue(Attribute attribute, DataValue dataValue, boolean force) throws UserException, ApplicationException
      Removes given dataValue from standardValue-DataValueSet of Attribute. If this dataValue was the last also deletes the complete DatavalueSet
      Parameters:
      attribute - mandatory
      dataValue - mandatory, must be part of a standardValue of given attribute
      force - only set to true if this datavalue is not the last, or no assignments of this standardvalue to complex entities exist, otherwise this results in a database exception (wrapped in AppEx). If false perform check for assignments and throw DeleteTiedElementException
      Throws:
      UserException - if user has not EDIT right or attribute is not in EDIT state
      ApplicationException
    • attributeStandardValueDelete

      public void attributeStandardValueDelete(Attribute attribute, DataValueSet dataValueSet, boolean force) throws UserException, ApplicationException
      Removes given standardValue-DataValueSet from Attribute.
      Parameters:
      attribute - mandatory
      dataValueSet - mandatory, must be a standardValue of given attribute
      force - only set to true if no assignments of this standardvalue to complex entities exist, otherwise this results in a database exception (wrapped in AppEx). If false perform check for assignments and throw DeleteTiedElementException
      Throws:
      UserException - if user has not EDIT right or attribute is not in EDIT state
      ApplicationException
    • attributeScriptValueSet

      public void attributeScriptValueSet(Attribute obj, String script) throws ApplicationException
      sets calculation script for given attribute
      Parameters:
      obj - the attribute to set the script to
      script - the script to associate with the attribute
      Throws:
      ApplicationException - if the script could not be set properly
    • attributeTypeDelete

      public void attributeTypeDelete(AttributeType attributeType) throws UserException, ApplicationException
      Checks if AttributeType is referenced by Attribute, or by ComplexTypeEntity as allowedAttributeType or by ClassificationHrc as allowedAttributeType. If not removes AttributeType from database and also deletes the collection tree belonging to this AttributeType.
      Parameters:
      attributeType - mandatory
      Throws:
      UserException - if AttributeType is in use or user has not role CONFIGADMIN
      ApplicationException
    • attributeTypeSave

      public AttributeType attributeTypeSave(AttributeType attributeType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given AttributeType by setting its fields from given paramMap.
      Parameters:
      attributeType - mandatory, must be attached if persistent
      dataMap - mandatory, contains values for the AttributeType's fields as key-value pairs
      Returns:
      inserted or updated AttributeType
      Throws:
      UserException - is user has not role CONFIGADMIN
      ApplicationException
    • dataTypeSave

      public DataType dataTypeSave(DataType dataType, DataMap dataMap) throws ApplicationException
      Throws:
      ApplicationException
    • dataTypeDelete

      public void dataTypeDelete(DataType dataType) throws UserException, ApplicationException
      Throws:
      UserException
      ApplicationException
    • dataTypeCopy

      public DataType dataTypeCopy(DataType dataType) throws ApplicationException
      Throws:
      ApplicationException
    • collectionCopy

      public Collection collectionCopy(Collection source, Collection targetParentCollection) throws ApplicationException
      copies given collection. if target collection is given, moves copy to target collection. else target collection is same collection as parent of source collection.

      this method makes a deep copy: if collection is not empty (has child collections or content entities) it starts an background job to recursively copy all the content accordingly.

      Parameters:
      source - mandatory
      targetParentCollection - optional. Copy is created a sibling of source is this is null.
      Throws:
      UserException - if user is lacking right INSERT on (actually used) target collection
      ApplicationException
    • collectionDelete

      public void collectionDelete(Collection collection) throws UserException, ApplicationException
      checks if Collection is referenced by other entities. Also checks if elements in this collections or in any of its sub collections are in use. If not removes Collection, all its sub collections and their contained elements from database. TODO: validateNotUsed should be also called for children
      Parameters:
      collection - mandatory
      Throws:
      UserException - if Collection or any of its elements are in use or if User lacks right DELETE.
      ApplicationException
    • collectionGetRoot

      public Collection collectionGetRoot(ICollectionManaged entity) throws UserException, ApplicationException
      gets the root collection for this collection managed entity. If the entity is a ComplexEntity and its collections are dependent on the ComplexEntity's type the entitie's type must be set. If the root collection does not exist inserts it.
      Parameters:
      entity - mandatory, may be new instance without any fields set.
      Returns:
      the root collection for this entity or its type if collection is type dependent
      Throws:
      UserException - currently not thrown
      ApplicationException
    • collectionGetRoot

      public Collection collectionGetRoot(ICollectionManaged entity, ComplexTypeEntity type) throws ApplicationException
      gets the root collection for this collection managed entity. If the entity is a ComplexEntity and its collections are dependent on the ComplexEntity's type the entitie's type must be set. If the root collection does not exist inserts it.
      Parameters:
      entity - mandatory, may be new instance without any fields set.
      type - mandatory if the entities have a root collection per type
      optional if there is only one global root collection.
      if rootPerType true it can only apply to entities that have a type, i.e. ComplexEntities.
      Returns:
      the root collection for this entity or its type if collection is type dependent
      Throws:
      UserException - currently not thrown
      ApplicationException
    • collectionItemsBuildFilter

      public mc.core.system.search.SearchFilter collectionItemsBuildFilter(Collection collection, boolean withLinked, Locale locale)
      return search filter to search for entities which have @collection as direct parent (EntityBase.Field.collection) or have @collection as secondary collection (CollectionToEntity) if @withLinked == true and Collection.getItemClass is ICollectionListManaged
      Parameters:
      collection - mandatory
      locale - optional, be used for order by, default is content locale
    • collectionManagedMove

      public void collectionManagedMove(List<? extends ICollectionManaged> collectionManagedObjects, Collection targetCollection) throws UserException, ApplicationException
      moves list of collection managed entities to given collection. Given objects must all be entities of the same class given by item class of target collection. MC8 do we need to check DELETE right on source collections? When moving secondary collection this is checked
      Parameters:
      collectionManagedObjects - mandatory
      targetCollection - mandatory
      Throws:
      UserException - if user has not INSERT right on target collection
      ApplicationException
    • collectionMove

      public void collectionMove(Collection collection, Collection targetCollection) throws ApplicationException
      moves given collection to given parent collection. Starts a background job to move all the children and contained objects. MC8 do we need to check DELETE right on source collection?
      Parameters:
      collection - mandatory
      targetCollection - mandatory
      Throws:
      UserException - to signal start of workflow and if user is lacking right INSERT on target collection
      ApplicationException
    • collectionSave

      public Collection collectionSave(Collection collection, DataMap dataMap) throws UserException, ApplicationException
      inserts or updates given Collection by setting its fields from given dataMap.
      Insert: the parent collection id must be provided in dataMap (root collections whose parent is null are inserted by method #collectionGetRoot). Checks for INSERT-right on parent collection.
      Update: checks for EDIT right on this collection
      Parameters:
      collection - mandatory
      dataMap - dataMap, contains values for the Collection's fields as key-value pairs
      Returns:
      inserted or updated Collection.
      Throws:
      UserException - is permission check fails
      ApplicationException
    • collectionIsCopyMoveAllowed

      public boolean collectionIsCopyMoveAllowed(Collection collection, Collection targetCollection) throws ApplicationException
      Throws:
      ApplicationException
    • ceAttributeValueGet

      public AttributeValue ceAttributeValueGet(ComplexEntity complexEntity, Attribute attribute) throws ApplicationException
      Load the AttributeValue representing all assignments with values (if exist) between the complexEntity and the attribute.
      Parameters:
      complexEntity - mandatory
      attribute - mandatory
      Returns:
      value if exists, else null
      Throws:
      ApplicationException
    • ceAttributeValuesGet

      public AttributeValues ceAttributeValuesGet(ComplexEntity complexEntity, List<Attribute> attributes) throws ApplicationException
      Load the AttributeValues (list of AttributeValue) representing all assignments with values (if exist) between the complexEntity and the attributes.
      Parameters:
      complexEntity - mandatory
      attributes - mandatory
      Returns:
      AttributeValues
      Throws:
      ApplicationException
    • ceAttributesAdd

      public void ceAttributesAdd(ComplexEntity complexEntity, List<Attribute> attributes, boolean sortByCollection) throws ApplicationException
      Object attributes: adds each Attribute to ComplexEntity and sets the defaultValue, if exists, as value. Always adds new attributes at end of list of existing attribute assignment (sets prio accordingly) within same collection if sortByCollection true, otherwise within same attributeType
      Parameters:
      complexEntity - mandatory, must be persistent
      attributes - mandatory
      sortByCollection - define is sorting is relative to collection or to attribute type
      Throws:
      ApplicationException
    • ceAttributeRemove

      public void ceAttributeRemove(ComplexEntity complexEntity, Attribute attribute) throws ApplicationException
      Removes all EntityToAttribute with all values for given attribute and complexEntity.
      Parameters:
      complexEntity - mandatory, must be persistent
      attribute - mandatory, must be persistent
      Throws:
      ApplicationException
    • ceAttributeChangeOrder

      public void ceAttributeChangeOrder(ComplexEntity complexEntity, Attribute attribute, boolean byCollection, boolean decreaseOrder) throws ApplicationException
      Increases or decreases prio of Attribute within list of all Attributes assigned to this ComplexEntity. If byCollection is true changes only the ordering of Attributes of the collection of given Attribute). Sets prio of all EntityToAttributes or of EntityToAttributes of this Collection accordingly.
      Checks for EDIT-right and edit state of ComplexEntity beforehand and calls setModified for EDIT on the ComplexEntity afterwards.
      Parameters:
      complexEntity - mandatory
      attribute - mandatory
      byCollection - if true orders entitytoAttributes within collection of attribute, otherwise all entityToAttributes of same attribute type
      decreaseOrder - if true moves attribute up one place, otherwise down
      Throws:
      ApplicationException
    • ceAttributeValueSet

      public void ceAttributeValueSet(ComplexEntity complexEntity, DataValueTO dataValueTO) throws ApplicationException
      Set data from given dataValueTO as attribute value for given entity.
      Parameters:
      complexEntity - mandatory
      dataValueTO - mandatory, also attribute must be set in dataValueTO. internal map must contain valid data according to dataType of attribute (see Field-enums of DataValue-subclasses). If editing a multivalue the data map must provide key entityToAttribute (id) for identification of the value. If setting an enumerated value the data map must provide key dataValueSet (id or internal description) for identification of the enum value.
      Throws:
      ApplicationException
    • ceAttributeValuesSet

      public void ceAttributeValuesSet(ComplexEntity complexEntity, List<DataValueTO> attributesToSet) throws ApplicationException
      Set data from given list of dataValueTO as attribute values for given entity.
      Parameters:
      complexEntity - mandatory
      attributesToSet - mandatory, @see #ceAttributeValueSet(ComplexEntity, DataValueTO) for details
      Throws:
      ApplicationException
    • ceAttributeValueRemove

      public void ceAttributeValueRemove(ComplexEntity complexEntity, Attribute attribute, DataValue dataValue) throws UserException
      Removes given dataValue from the attribute values of complexEntity. Also removes the dataValueSet if the dataValue is the last and attribute is not enumeration. If attribute is config attribute and if DataValueSet is deleted, deletes also the EntityToAttribute. For object attributes in this case leaves the entityToAttribute to handle inherited values. If attribute is enumeration only removes the DataValueSet from EntityToAttribute which will be deleted if config attribute
      Parameters:
      complexEntity - mandatory
      attribute - mandatory
      dataValue - mandatory, must be persistent and belong to EntityToAttribute of this complexEntity and attribute, or to attribute's standardValues if enumeration
      Throws:
      UserException
    • ceAttributeValueRemove

      public void ceAttributeValueRemove(EntityToAttribute entityToAttribute) throws ApplicationException
      Removes given EntityToAttribute from the attribute values of complexEntity. Also removes the dataValueSet with all values if the attribute is not enumeration.
      Parameters:
      entityToAttribute - mandatory
      Throws:
      ApplicationException
    • ceAttributeValueCopy

      public void ceAttributeValueCopy(ComplexEntity object, EntityToAttribute entityToAttribute) throws ApplicationException
      Copy attribute assignment with value onto the object.
      Parameters:
      object - mandatory
      entityToAttribute - mandatory
      Throws:
      ApplicationException
    • ceAttributeValueChangeOrder

      public void ceAttributeValueChangeOrder(EntityToAttribute entityToAttribute, boolean decreaseOrder) throws UserException
      Change ordering of values of a multi value attribute.
      Parameters:
      entityToAttribute - mandatory, represents the value
      decreaseOrder - if true, moves value one place up in list, otherwise down
      Throws:
      UserException - if user has not edit right or state on object to which value belongs
    • ceAttributeValueSetOrder

      public void ceAttributeValueSetOrder(EntityToAttribute entityToAttribute, int target) throws UserException
      Set order of value of a multi value attribute.
      Parameters:
      entityToAttribute - mandatory, represents the value
      target - target order position
      Throws:
      UserException - if user has not edit right or state on object to which value belongs
    • ceAttributeSetOrder

      public void ceAttributeSetOrder(ComplexEntity entity, Attribute attribute, int target, List<Attribute> attributes) throws UserException
      Moves attribute in given list to target prio (prios start with 1) and/or stores sort order according to list of attributes. If list of attributes is given and it contains attributes for which the entity has no assignment (inherited attributes) the sort order is stored as EntityToAttributePrio, otherwise the prio is store in the assignments (EntityToAttribute.
      Parameters:
      complexEntity - mandatory
      attribute - optional. if null, list of attributes must be given. In this case EntityToAttributePrios are created for the sort order given by the list of attributes.
      attributes - optional, if given must be the complete list of attributes to be ordered. Given attribute must be present in the list.
      targetPrio - must be a valid position of given list, starting with 1
      Throws:
      IllegalArgumentException - if given attribute is not a member of list of attributes
      IndexOutOfBoundsException - if targetPrio is not a valid index of list
      UserException
    • ceAttributeRestoreOrderDefault

      public void ceAttributeRestoreOrderDefault(ComplexEntity complexEntity, Collection collection) throws UserException
      remove manual sorting for all attributes for this entity, optionally only attributes of given collection
      Parameters:
      entity - mandatory
      collection - optional
      Throws:
      UserException
    • ceAttributeToggleInheritance

      public void ceAttributeToggleInheritance(ComplexEntity entity, Attribute attribute, boolean disable)
      Removes or returns given attribute from or to display of inherited attributes of this entity.
      Parameters:
      entity - mandatory
      attribute - mandatory
      disable -
    • ceMultiIndexingSetValues

      public void ceMultiIndexingSetValues(ComplexEntity complexEntity, Attribute attribute, List<DataValueTO> dataValueTOs, DataValueTO.AttributeAction action) throws ApplicationException
      MULTI INDEXING: set given values for the attribute on the compleEntity.
      Parameters:
      complexEntity - mandatory
      attribute - mandatory
      dataValueTOs - mandatory, optional if AttributeAction is DELETE
      action - mandatory
      Throws:
      ApplicationException
    • ceSecondaryCollectionAdd

      public void ceSecondaryCollectionAdd(ComplexEntity complexEntity, Collection collection) throws ApplicationException
      add given collection as secondary collection if not already present in collections (secondary and primary) of given entity. Checks edit right and state on entity, insert right on collection
      Parameters:
      complexEntity - mandatory
      collection - mandatory
      Throws:
      ApplicationException
    • ceSecondaryCollectionRemove

      public void ceSecondaryCollectionRemove(ComplexEntity complexEntity, Collection collection) throws UserException, ApplicationException
      removes given collection from secondary collections of given entity. Checks edit right and state on entity, delete right on collection
      Parameters:
      complexEntity - mandatory
      collection - mandatory
      Throws:
      ApplicationException
      UserException
    • ceSecondaryCollectionCopy

      public <T extends ComplexEntity> void ceSecondaryCollectionCopy(List<T> entityList, Collection targetCollection) throws UserException, ApplicationException
      add secondary collection link to given target collection for all entities of list for which user has EDIT right. User must haveINSERT right on target collection
      Parameters:
      entityList - mandatory
      targetCollection - mandatory
      Throws:
      UserException - containing the names of the entities which could not be copied because of missing right
      ApplicationException
    • ceSecondaryCollectionMove

      public <T extends ComplexEntity> void ceSecondaryCollectionMove(List<T> entityList, Collection sourceCollection, Collection targetCollection) throws UserException, ApplicationException
      move secondary collection link from given source collection to target collection for all entities of lists for which user has EDIT right and state. User must have DELETE right on source collection and INSERT right on target collection
      Parameters:
      entityList - mandatory
      sourceCollection - mandatory
      targetCollection - mandatory
      Throws:
      UserException - containing the names of the entities which could not be copied because of missing right or state
      ApplicationException
    • ceEntityProfileApply

      public void ceEntityProfileApply(ComplexEntity entity, EntityProfile entityProfile, CopyFilter copyFilter) throws UserException, ApplicationException
      Copies name, description, externalKey, type attributes as far as configured by entity type and secondary collections, if entity is ICollectionListManaged, from entityProfile onto target entity.
      Parameters:
      entity - ComplexEntity, mandatory, entity onto which the data should be copied
      entityProfile - EntityProfile, mandatory
      copyFilter - CECopyFilter optional, use to differentiate which data should be copied. If null all data is copied.
      Throws:
      UserException - if user has not edit right/state on entity or if not all attributes of entityProfile could be copied due to missing configuration on entity. In the latter case the rest of the data has been copied onto entity.
      ApplicationException
    • ceEntityProfileApply

      public <T extends ComplexEntity> void ceEntityProfileApply(List<T> entities, EntityProfile entityProfile, CopyFilter copyFilter) throws UserException, ApplicationException
      Copies name, description, externalKey, type attributes as far as configured by entity type and secondary collections, if entity is ICollectionListManaged, from entityProfile onto each target entity of given list.
      Parameters:
      entities - List of ComplexEntity, mandatory, entities onto which the data should be copied
      entityProfile - EntityProfile, mandatory
      copyFilter - CECopyFilter optional, use to differentiate which data should be copied. If null all data is copied.
      Throws:
      UserException - with messages for all entity for which user has not edit right/state or if not all attributes of entityProfile could be copied due to missing configuration on entity. In the latter case the rest of the data has been copied onto entity.
      ApplicationException
    • ceGetPreviewAsset

      public <T extends ComplexEntity> Asset ceGetPreviewAsset(T complexEntity)
      Returns the first asset of the first type-Attribute with not empty DataValue of Type DVAsset, if nothing found returns null.
      Parameters:
      complexEntity - mandatory
      Returns:
      asset for preview or null
    • ceIsAllowedAttribute

      public <T extends ComplexEntity> boolean ceIsAllowedAttribute(T complexEntity, Attribute attributeToCheck)
      Check if attribute is configured for this complex entity.
      Parameters:
      complexEntity - mandatory
      attributeToCheck - mandatory
    • ceRelationAdd

      public <T extends ComplexEntity> void ceRelationAdd(T entity, List<T> relatedList, RelationType relationType) throws ApplicationException
      Creates a relation of given relationType between given complexEntity and each entity of given list, if not already exists. Adds the new relation at the end of already existing relations for this entity for this relation type.
      Parameters:
      entity - mandatory, complex entity of type T
      relatedList - mandatory, List of complex entities of same type T
      relationType - mandatory, must fit to types of given complexEntities that will be the partners in the new relations
      Throws:
      ApplicationException
    • ceRelationChangeOrder

      public <T extends ComplexEntity> void ceRelationChangeOrder(T complexEntity, ComplexEntity relatedEntity, RelationType relationType, boolean decreaseOrder) throws UserException
      Moves relations defined by given complexEntity, relatedEntity and relationType one place up or down in list of relations of same type of given complexEntity.
      Parameters:
      complexEntity - mandatory
      relatedEntity - mandatory
      relationType - mandatory, must fit to types of given complexEntities that are the partners in the relation
      decreaseOrder - if true move up, otherwise down
      Throws:
      UserException - if user has not edit right or state on given complexEntity
    • ceRelationGetRelated

      public List<ComplexEntity> ceRelationGetRelated(ComplexEntity entity, RelationType relationType)
      Searches for ComplexEntities that are in a Relation of given RelationType with given ComplexEntity. If RelationType is MASTER_SLAVE returns the entities2 of Relation, for EQUAL-RelationType returns all ComplexEntities except the given. A Relation is stored as EntityToEntity. WARNING: this method assumes that related entity is of same objectClass as given entity!
      Parameters:
      entity - ComplexEntity, mandatory
      relationType - mandatory
      Returns:
      List of ComplexEntity of the same class as given ComplexEntity, if none found return empty list.
    • ceRelationGetRelationTypes

      public List<RelationType> ceRelationGetRelationTypes(ComplexEntity entity)
      Returns list with relationTypes where type of given entity is either defined as master or the RelationType is EQUAL and the type of given entity is either entity1 or in entities2.
      Parameters:
      entity - mandatory
      Returns:
      List of RelationType or empty list if no such RelationType exist
    • ceRelationGetAll

      public RelationValues<ComplexEntity> ceRelationGetAll(ComplexEntity entity, RelationType relationType)
      Returns list with RelationValues where given entity is either master or the RelationType is EQUAL and given entity is either entity1 or in entities2.
      Parameters:
      entity - mandatory
      relationType - mandatory
      Returns:
      RelationValues: list of RelationValue
    • ceRelationGetAttributeProfile

      public EntityProfile ceRelationGetAttributeProfile(EntityToEntity entityToEntity) throws ApplicationException
      Gets or creates EntityProfile for given relation.
      Parameters:
      entityToEntity - mandatory
      Returns:
      the EntityProfile
      Throws:
      ApplicationException
    • ceRelationRemove

      public void ceRelationRemove(ComplexEntity entity, RelationType relationType, ComplexEntity entityRelated) throws ApplicationException
      Removes relation between given complexEntities of given RelationType if exists.
      Parameters:
      entity - mandatory
      relationType - mandatory
      entityRelated - optional, if null removes all relations of given type from given complexEntity
      Throws:
      ApplicationException
    • ceRelationsSetOrder

      public <T extends ComplexEntity> void ceRelationsSetOrder(T complexEntity, Map<EntityToEntity,Integer> prioMap) throws UserException
      Set prio of EntityToEntity for list of all Relations of this ComplexEntity according given map.
      Parameters:
      complexEntity - the entity for which the list of relations is to be ordered. Can be entity1 or entity2 of relation
      prioMap - mandatory, EntityToEntity as key, the prio to set as value
      Throws:
      UserException - if user has not EDIT-right on complexEntity or complexEntity is not in editable state
    • ceValidityFilterSet

      public void ceValidityFilterSet(ComplexEntity entity, List<Territory> territories, List<PublicationProfileType> ppTypes) throws ApplicationException
      Set validity filter for entity.
      Parameters:
      entity - mandatory
      territories - optional
      ppTypes - optional
      Throws:
      ApplicationException
    • ceSetRightInheritanceDisabled

      public void ceSetRightInheritanceDisabled(ComplexEntity entity, boolean disable) throws UserException
      Only relevant for ICollectionManaged: disable or re-enable implicit inheritance of rights from collection. Should only be called for entities that have own rights, e.g. assets where asset type is marked for object rights. By default right inheritance is enabled on ICollectionManaged entities.
      Parameters:
      entity - mandatory
      disable - if true, disable, otherwise set to enabled
      Throws:
      UserException - if user is missing GRANT right on entity
    • ctAttributeTypeAdd

      public void ctAttributeTypeAdd(ComplexTypeEntity complexTypeEntity, AttributeType attributeType) throws UserException
      add attributeType as allowedAttributeType to complexTypeEntity
      Parameters:
      complexTypeEntity - mandatory
      attributeType - mandatory
      Throws:
      UserException - if user has not role config admin
    • ctAttributeAdd

      public void ctAttributeAdd(ComplexTypeEntity complexTypeEntity, List<Attribute> attributes, boolean sortByCollection) throws UserException
      adds given attributes as type attribute to given complexType if not already assigned. Adds at end of list of already assigned attributes, either of all, or of same collection as given attributes
      Parameters:
      complexTypeEntity - mandatory
      attributes - mandatory, list of attributes that must be of subType TYPES or PRESENTATION, must be of same collection if groupByCollection is true
      sortByCollection - sort only within collection
      Throws:
      UserException - if user has not role configadmin but not for entity profile types
    • ctAttributeChangeOrder

      public void ctAttributeChangeOrder(ComplexTypeEntity complexTypeEntity, Attribute attribute, boolean byCollection, boolean decreaseOrder) throws UserException
      increases or decreases prio of given type attribute. Sets prio of all type attributes, or of type attributes of collection of attribute accordingly.
      Parameters:
      complexTypeEntity - mandatory
      attribute - mandatory, attribute to be moved up or down one place in list of assigned attributes, optionally of same collection
      byCollection - set ordering only of assigned attributes within same collection
      decreaseOrder - if true move up, otherwise down
      Throws:
      UserException - if user has not role configadmin but not for entity profile types
    • ctAttributesSetMandatoryAndPreviewFlags

      public void ctAttributesSetMandatoryAndPreviewFlags(ComplexTypeEntity complexTypeEntity, List<Attribute> mandatoryAttributes, List<Attribute> previewAttributes) throws UserException
      sets all given type attributes to mandatory/preview, all others to not mandatory/not preview.
      Parameters:
      complexTypeEntity - mandatory
      mandatoryAttributes - optional, if null or empty sets all assigned attributes to not mandatory (default). if not empty must contain attributes assigned to given type
      previewAttributes - optional, if null or empty sets all assigned attributes to not preview (default). if not empty must contain attributes assigned to given type
      Throws:
      UserException - if user has not role configadmin
    • ctAttributesSetEditable

      public void ctAttributesSetEditable(ComplexTypeEntity complexTypeEntity, List<Attribute> attributes, boolean value) throws UserException
      Sets editable flag to given value for all corresponding TypeEntityToAttributes for given attribute-list.
      Parameters:
      complexTypeEntity - mandatory
      attributes - mandatory, should be attributes already assigned to this type, empty list is allowed.
      value - value to be set for the flag editable in the TypeEntityToAttributes
      Throws:
      UserException - if user has not role configadmin
    • ctStateGroupTypeRemove

      public void ctStateGroupTypeRemove(ComplexTypeEntity complexTypeEntity, StateGroupType stateGroupType) throws UserException
      removes given stateGroupType from given complexTypeEntity
      Parameters:
      complexTypeEntity - mandatory
      stateGroupType - mandatory
      Throws:
      UserException - if user has not role configadmin
    • ctStateGroupTypesAdd

      public void ctStateGroupTypesAdd(ComplexTypeEntity complexTypeEntity, List<StateGroupType> stateGroupTypes) throws UserException
      adds each StateGroupType from given list to stateGroupTypes of complexTypeEntity, if not already present
      Parameters:
      complexTypeEntity - mandatory
      stateGroupTypes - mandatory
      Throws:
      UserException
    • nodeBasketSave

      public Basket nodeBasketSave(Basket basket, DataMap dataMap) throws ApplicationException
      Inserts or updates given Basket by setting its fields from given paramMap. if basket is new sets current user as owner, sets a default name containing current date and sets this basket active.
      Parameters:
      basket - mandatory, must be attached if already persistent
      dataMap - mandatory, contains values for the Basket's fields as key-value pairs
      Returns:
      inserted or updated Basket. If Basket has been inserted it contains now the newly created id
      Throws:
      ApplicationException
    • nodeBasketCopy

      public Basket nodeBasketCopy(Basket sourceBasket) throws ApplicationException
      copies basket: only base info (without shared dates and basket receiver) and basket member
      Sets the copied basket to active for current user.
      Parameters:
      sourceBasket - mandatory
      Returns:
      the copy of sourceBasket
      Throws:
      ApplicationException
    • nodeBasketDelete

      public void nodeBasketDelete(Basket basket) throws ApplicationException
      deletes Basket from database if own, else only shared link for current user be deleted
      Parameters:
      basket - mandatory
      Throws:
      ApplicationException
    • nodeBasketAddNode

      public void nodeBasketAddNode(Basket basket, Node node) throws ApplicationException
      adds node to basket.
      Parameters:
      basket - mandatory
      node - mandatory
      Throws:
      ApplicationException
    • nodeBasketAddNodes

      public int nodeBasketAddNodes(Basket basket, List<Node> nodes) throws ApplicationException
      adds nodes from list to given basket.
      Parameters:
      basket - mandatory
      nodes - mandatory
      Returns:
      the count of nodes be added
      Throws:
      ApplicationException
    • nodeBasketInsert

      public Basket nodeBasketInsert(List<Node> nodes) throws ApplicationException
      Create the new active basket for current user and adds nodes from list to it.
      Parameters:
      nodes - mandatory
      Throws:
      ApplicationException
    • nodeBasketRemoveNode

      public void nodeBasketRemoveNode(Basket basket, Node node) throws ApplicationException
      Removes node from basket.
      Parameters:
      basket - mandatory
      node - mandatory
      Throws:
      ApplicationException
    • nodeBasketRemoveNodes

      public void nodeBasketRemoveNodes(Basket basket, List<Node> nodes) throws ApplicationException
      Removes nodes from basket.
      Parameters:
      basket - mandatory
      nodes - List mandatory
      Throws:
      ApplicationException
    • nodeBasketAddReceiver

      public void nodeBasketAddReceiver(Basket basket, Principal principal) throws UserException, ApplicationException
      add new basket receiver with generated external key and principal if basket-principal combination not exist
      Parameters:
      basket - mandatory
      principal - mandatory, must be valid user or user group, else UserException
      Throws:
      ApplicationException
      UserException
    • nodeBasketRemoveReceiver

      public void nodeBasketRemoveReceiver(Basket basket, BasketReceiver basketReceiver) throws ApplicationException
      Remove a receiver from a node basket.
      Parameters:
      basket - mandatory
      basketReceiver - mandatory
      Throws:
      ApplicationException
    • nodeBasketSetActive

      public void nodeBasketSetActive(Basket basket) throws ApplicationException
      Sets this basket active for the session user. Sets currently active basket, if exists, for this user to inactive.
      Parameters:
      basket - mandatory
      Throws:
      ApplicationException
    • nodeBasketActiveForUser

      public Basket nodeBasketActiveForUser() throws ApplicationException
      Returns:
      the current active Basket for session user, if no Basket exists creates one and inserts in database.
      Throws:
      ApplicationException
    • nodeBasketGetFilterForShared

      public mc.core.system.search.SearchFilter nodeBasketGetFilterForShared(boolean onlyFullControl)
      Return search filter for shared node basket:
      Node.class is the class of basket item objects,
      receiver is current user or his group,
      criteria for shared is true criteria for valid from : shareValidFrom <= today <= shareValidUntil
      Returns:
      SearchFilter
    • nodeBasketToggleLock

      public void nodeBasketToggleLock(Basket basket) throws ApplicationException
      Change lock flag for basket.
      Parameters:
      basket - mandatory
      Throws:
      ApplicationException
    • nodeBasketExportDCM

      public void nodeBasketExportDCM(Basket basket, Locale locale, EntityProfile profile) throws ApplicationException, UserException
      Starts the workflow (@see WebDCMExportActionlet) to generate excel (DCM) export for all basket assets with base data and attributes.
      using the entity profile (optional, default is all type attributes be exported) and
      the given locale (optional, default is content locale from session data).
      Parameters:
      basket - mandatory, must be attached
      locale - optional, default is content locale from session data
      profile - optional, default is all type attributes be exported
      Throws:
      UserException - to signal asynchronous process start
      ApplicationException - on any common error
    • nodeBasketImportDCM

      public void nodeBasketImportDCM(Basket basket, Locale locale, InputStream inputStream, String filename) throws ApplicationException, UserException
      Start the workflow (@see WebDCMImportActionlet) to import excel (DCM) file with base data and attributes using the given locale.
      Parameters:
      basket - mandatory
      locale - optional, default is content locale from session data
      inputStream - mandatory
      filename - mandatory, the import file be insert to file store with it
      Throws:
      UserException
      ApplicationException
    • classificationAddAttribute

      public void classificationAddAttribute(Classification classification, List<Attribute> attributes, boolean byCollection) throws UserException
      Adds given attribute as type attribute to given classification, sets prio of assignment.
      Parameters:
      classification - mandatory
      attributes - mandatory, must be of same collection if byCollection is true
      byCollection - if true only regards ordering within same collection
      Throws:
      UserException - if user has not edit right on classificationHrc of this classification
    • classificationAttributeChangeOrder

      public void classificationAttributeChangeOrder(Classification classification, Attribute attribute, boolean byCollection, boolean decreaseOrder) throws UserException
      Moves given attribute one place up or down in list of assigned attributes of this classifcation, optionally only within list of attributes of same collection.
      Parameters:
      classification - mandatory
      attribute - mandatory, must be assigned to this classification
      byCollection - if true only regards ordering within same collection
      decreaseOrder - if true moves up, otherwise down
      Throws:
      UserException - if user has not edit right on classificationHrc of this classification
    • classificationAttributesSetMandatory

      public void classificationAttributesSetMandatory(Classification classification, List<Attribute> mandatoryAttributes) throws UserException
      sets all assigned attributes that are in given list to mandatory, all other assigned attributes to not mandatory
      Parameters:
      classification - mandatory
      mandatoryAttributes - optional
      Throws:
      UserException - if user has not edit right on classificationHrc of this classification
    • classificationAttributeSetAllowedDVSets

      public void classificationAttributeSetAllowedDVSets(Classification classification, Attribute attribute, List<DataValueSet> dvSets) throws UserException
      set all dataValueSets in given list to allowed for the attribute assignment in classification. classificationAttributeGetAllowedDVSets(Classification, Attribute) must be used to filter the list
      Parameters:
      classification - mandatory
      attribute - mandatory, must be an enumeration attribute. else method throws IllegalArgumentException. if attribute is not assigned to classification, method does nothing.
      dvSets - optional. if list is not empty these dataValueSets are set as allowed for the assignment. if list is null or empty, filter is reset (all dataValueSets allowed)
      Throws:
      UserException - if user has not edit right on classificationHrc of this classification
    • classificationAttributeGetAllowedDVSets

      public List<DataValueSet> classificationAttributeGetAllowedDVSets(Classification classification, Attribute attribute)
      get all dataValueSets allowed for the attribute assignment in classification. classificationAttributeSetAllowedDVSets(Classification, Attribute, List) must be used to set filter for list of standard values
      Parameters:
      classification - mandatory
      attribute - mandatory, must be an enumeration attribute. else method throws IllegalArgumentException. if attribute is not assigned to classification method returns empty list. if filtering of dataValueSets is not set, method returns all standard value dataValueSets from attribute.
      Returns:
      empty, filtered or complete list. never null.
    • classificationDelete

      public void classificationDelete(Classification classification, boolean force) throws UserException, ApplicationException
      Delete the classification if not in use, or force delete and remove references
      Parameters:
      classification - mandatory
      force - if true also deletes classification when referenced and removes the references
      Throws:
      UserException - if classification is in use or user has not delete right on classificationHrc
      UserException
      ApplicationException
    • classificationHrcDelete

      public void classificationHrcDelete(ClassificationHrc classificationHrc) throws UserException, ApplicationException
      Delete the classification hierarchy if it is empty.
      Parameters:
      classificationHrc - mandatory
      Throws:
      UserException - if classificationHrc is not empty
      ApplicationException
    • classificationHrcSave

      public ClassificationHrc classificationHrcSave(ClassificationHrc classificationHrc, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates the classificationHrc by setting its field from dataMap. User must have role CONFIGADMIN to insert a new classificationHrc
      Parameters:
      classificationHrc - mandatory
      dataMap - mandatory
      Returns:
      the updated or inserted ClassificationHrc
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • classificationRemoveAttribute

      public void classificationRemoveAttribute(Classification classification, Attribute attribute, boolean force) throws ApplicationException
      Removes given attribute from list of assigned attributes of this classification.
      Parameters:
      classification - mandatory
      attribute - mandatory
      force - ignored for now
      Throws:
      ApplicationException
    • classificationSave

      public Classification classificationSave(Classification classification, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given classification with data from dataMap. User must have INSERT right on classificationHrc in order to insert, EDIT right on classificationHrc in order to edit classification.
      Parameters:
      classification - mandatory
      dataMap - mandatory
      Returns:
      the inserted or updated classification
      Throws:
      UserException - if user has not INSERT or EDIT right
      UserException
      ApplicationException
    • entityProfileCollectionAdd

      public void entityProfileCollectionAdd(EntityProfile entityProfile, Collection collection) throws ApplicationException
      Add a secondary collection to entity profile.
      Parameters:
      entityProfile - mandatory
      collection - mandatory
      Throws:
      ApplicationException
    • entityProfileCollectionChangeOrder

      public void entityProfileCollectionChangeOrder(EntityProfile entityProfile, Collection collection, boolean decreaseOrder) throws ApplicationException
      Change place of collection in list of secondary collections of entityProfile.
      Parameters:
      entityProfile - mandatory
      collection - mandatory, collection must be assigned to entityProfile
      decreaseOrder - if true, moves collection up in list, otherwise down
      Throws:
      ApplicationException
    • entityProfileCreate

      public EntityProfile entityProfileCreate(EntityProfile entityProfile, ComplexEntity sourceEntity, DataMap dataMap) throws ApplicationException
      Creates a new entity profile from data in dataMap. Assigns it the type attributes of given entity,.
      Parameters:
      entityProfile - optional, if null new instance is created
      sourceEntity - mandatory
      dataMap - mandatory, should at least have params for additional properties of entityProfile such as name and subType of entityProfileType
      Returns:
      newly created entityProfile
      Throws:
      ApplicationException
    • entityProfileDelete

      public void entityProfileDelete(EntityProfile entityProfile) throws DeleteTiedElementException, UserException, ApplicationException
      Checks if EntityProfile is referenced by Hotfolder, Collection, RelationType. If not removes EntityProfile from database and also deletes the attributes with values belonging to this EntityProfile. In case of ATTRIBUTE_PROFILE also deletes the EntityProfileType.
      Parameters:
      entityProfile - mandatory
      Throws:
      DeleteTiedElementException
      UserException - Throws UserException if EntityProfile is in use or, for EntityProfile of subTypes ATTRIBUTE_SET_COLLECTION, ATTRIBUTE_SET_RELATION user has not role CONFIGADMIN.
      ApplicationException
      See Also:
      • for usage of EntityProfile
    • entityProfileSave

      public EntityProfile entityProfileSave(EntityProfile entityProfile, DataMap dataMap) throws ApplicationException
      Inserts or updates given EntityProfile by setting its fields from given paramMap. if for subType ATTRIBUTE_PROFILE also inserts an EntityProfileType, for the other subTypes the entityProfileType must be given in dataMap.
      Parameters:
      entityProfile - mandatory
      dataMap - mandatory, contains values for the EntityProfile's fields as key-value pairs
      Returns:
      inserted or updated EntityProfile.
      Throws:
      ApplicationException
    • entityProfilesGet

      public <T extends IBaseEntity> List<EntityProfile> entityProfilesGet(Class<T> entityClass)
      Return a list of entity profiles (EntityProfile of subtype ENTITY_PROFILE) for this entity class.
      Parameters:
      entityClass - mandatory
      Returns:
      List
    • entityProfileTypeForCollection

      public EntityProfileType entityProfileTypeForCollection() throws ApplicationException
      Returns:
      the EntityProfileType for collections. There is only one such EntityProfileType. If it does not exist returns null. The EntityProfileType defines the list of attributes that can be assigned to each collection. The attributes and their values which are set at the collection will be inherited by the collection entries. Only used for asset collections.
      Throws:
      ApplicationException
    • permissionProfiles

      public <T extends IBaseEntity> List<EntityProfile> permissionProfiles()
      Returns:
      a list of permission profiles (EntityProfile of subtype PERMISSON_PROFILE). The same permission profile can be used for different entity classes (subclasses of ComplexEntity) and are managed centrally by power users (no distinction between own and shared)