Class ChannelRI

java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.AbstractAPI
mc.core.domain.channel.ChannelRI

@Path("/") @Produces("application/json") public class ChannelRI extends AbstractAPI
The channel RI class extends the channel API and exposes relevant functions as REST enabled URIs. ChannelRI handels navigations, publication profiles, import/export and configuration for these
  • Constructor Details

    • ChannelRI

      public ChannelRI()
  • Method Details

    • publicationProfileInsert

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.publicationProfileSave(PublicationProfile, DataMap)
    • publicationProfileEdit

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.publicationProfileSave(PublicationProfile, DataMap)
    • publicationProfileDelete

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

      Delete a publication profile with children.

      Throws:
      UserException
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfileDelete(PublicationProfile)
    • publicationProfileCopy

      @POST @Path("publicationprofile/{key}/copy") public void publicationProfileCopy(@PathParam("key") String key, @QueryParam("collection") String collectionKey) throws UserException, ApplicationException, IOException
      POST: publicationprofile/{key}/copy?collection={collectionKey}

      Copy publication profile defined by key to a new collection or same collection as source navigation hierarchy.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.publicationProfileCopy(PublicationProfile, Collection)
    • publicationProfileSetLocales

      @POST @Path("publicationprofile/{key}/locales") public void publicationProfileSetLocales(@PathParam("key") String key) throws ApplicationException
      POST: publicationprofile/{key}/locales?data=[list of datamap for PublicationProfileLocale]

      Set all publication profile locales (locale with replacement locale) for the publication profile.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfileSetLocales(PublicationProfile, List)
    • publicationProfileAddNavigationHierarchy

      @POST @Path("publicationprofile/{key}/navigationhrc/{navigationHrcKey}/add") public void publicationProfileAddNavigationHierarchy(@PathParam("key") String key, @PathParam("navigationHrcKey") String navigationHrcKey) throws ApplicationException
      POST: publicationprofile/{key}/navigationhrc/{navigationHrcKey}/add

      Add the navigation hierarchy to the publication profile.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfileAddNavigationHierarchy(PublicationProfile, NavigationHrc, int)
    • publicationProfileRemoveNavigationHierarchy

      @DELETE @Path("publicationprofile/{key}/navigationhrc/{navigationHrcKey}/remove") public void publicationProfileRemoveNavigationHierarchy(@PathParam("key") String key, @PathParam("navigationHrcKey") String navigationHrcKey, @QueryParam("force") @DefaultValue("false") boolean force) throws ApplicationException
      DELETE: publicationprofile/{key}/navigationhrc/{navigationHrcKey}/remove?force=true

      Remove the navigation hierarchy from the publication profile.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfileRemoveNavigationHierarchy(PublicationProfile, NavigationHrc, boolean)
    • publicationProfileRemovePublicationMap

      @DELETE @Path("publicationprofile/{key}/map/{publicationMapKey}/remove") public void publicationProfileRemovePublicationMap(@PathParam("key") String key, @PathParam("publicationMapKey") String publicationMapKey) throws ApplicationException
      DELETE: publicationprofile/{key}/map/{publicationMapKey}/remove

      Remove the publication map from the publication profile.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfileRemovePublicationMap(PublicationProfile, PublicationProfileMap)
    • publicationProfilePerformExport

      @POST @Path("publicationprofile/{key}/performexport") public void publicationProfilePerformExport(@PathParam("key") String key) throws ApplicationException
      POST: publicationprofile/{key}/performexport

      Starts the export defined by this publicationProfile

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfilePerformExport(PublicationProfile)
    • publicationProfilePerformExportFromSearchResult

      @POST @Path("publicationprofile/{key}/searchresult/{searchResultId}/performexport") public void publicationProfilePerformExportFromSearchResult(@PathParam("key") String key, @PathParam("searchResultId") String searchResultId) throws ApplicationException
      POST: publicationprofile/{key}/searchresult/{searchResultId}/performexport

      Starts the export defined by this publicationProfile with objects from the search result

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfilePerformExport(PublicationProfile, String)
    • publicationProfilePerformExportFromBasket

      @POST @Path("publicationprofile/{key}/basket/{basketKey}/performexport") public void publicationProfilePerformExportFromBasket(@PathParam("key") String key, @PathParam("basketKey") String basketKey) throws ApplicationException
      POST: publicationprofile/{key}/basket/{basketKey}/performexport

      Starts the export defined by this publicationProfile with objects from the basket

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfilePerformExport(PublicationProfile, Basket)
    • publicationDelete

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

      Deletes the publication

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationDelete(mc.core.model.channel.Publication)
    • publicationProfileTypeInsert

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.publicationProfileTypeSave(PublicationProfileType, DataMap)
    • publicationProfileTypeEdit

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.publicationProfileTypeSave(PublicationProfileType, DataMap)
    • publicationProfileTypeDelete

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

      Delete a publication profile type with children.

      Throws:
      UserException
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfileTypeDelete(PublicationProfileType)
    • publicationProfileTypeCopy

      @POST @Path("publicationprofiletype/{key}/copy") public void publicationProfileTypeCopy(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: publicationprofiletype/{key}/copy

      Copy publication profile type defined by key

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.publicationProfileTypeCopy(PublicationProfileType)
    • publicationProfileTypeRemovePublicationMap

      @DELETE @Path("publicationprofiletype/{key}/map/{ppTypeMapKey}/remove") public void publicationProfileTypeRemovePublicationMap(@PathParam("key") String key, @PathParam("ppTypeMapKey") String ppTypeMapKey) throws ApplicationException
      DELETE: publicationprofiletype/{key}/map/{ppTypeMapKey}/remove

      Remove the publication map from the publication profile.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.publicationProfileTypeRemovePublicationMap(PublicationProfileType, mc.core.model.channel.PublicationProfileTypeMap)
    • importProfileInsert

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfileSave(ImportProfile, DataMap)
    • importProfileEdit

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfileSave(ImportProfile, DataMap)
    • importProfileDelete

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

      Delete a import profile with children.

      Throws:
      UserException
      ApplicationException
      See Also:
      • ChannelAPI.importProfileDelete(ImportProfile)
    • importProfileCopy

      @POST @Path("importprofile/{key}/copy") public void importProfileCopy(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: importprofile/{key}/copy

      Copy import profile defined by key.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfileCopy(ImportProfile)
    • importProfileRemoveImportMap

      @DELETE @Path("importprofile/{key}/map/{importMapKey}/remove") public void importProfileRemoveImportMap(@PathParam("key") String key, @PathParam("importMapKey") String importMapKey) throws ApplicationException
      DELETE: importprofile/{key}/map/{importMapKey}/remove

      Remove the import map from the import profile.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.importProfileRemoveImportMap(ImportProfile, ImportProfileMap)
    • importProfileSetImportFile

      @POST @Path("importprofile/{key}/filename/{filename}") public void importProfileSetImportFile(@PathParam("key") String key, @PathParam("filename") String filename) throws ApplicationException, IOException
      POST: importprofile/{key}/filename/{filename} with uploaded file in POST body

      Upload file for import profile.

      Throws:
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfileSetImportFile(ImportProfile, InputStream, String)
    • importProfilePerformImport

      @POST @Path("importprofile/{key}/performimport") public void importProfilePerformImport(@PathParam("key") String key, @QueryParam("fileId") String fileId, @QueryParam("filename") String filename) throws ApplicationException, IOException
      POST: importprofile/{key}/performimport?fileId={fileId}&filename={filename}

      Starts the import defined by this importProfile, if fileId and filename are given with these as reference for a file otherwise with file stored with import profile

      Throws:
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfilePerformImport(ImportProfile)
    • importDelete

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

      Delete the import.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.importDelete(mc.core.model.channel.Import)
    • importProfileTypeInsert

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfileTypeSave(ImportProfileType, DataMap)
    • importProfileTypeEdit

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

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfileTypeSave(ImportProfileType, DataMap)
    • importProfileTypeDelete

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

      Delete a import profile type with children.

      Throws:
      UserException
      ApplicationException
      See Also:
      • ChannelAPI.importProfileTypeDelete(ImportProfileType)
    • importProfileTypeCopy

      @POST @Path("importprofiletype/{key}/copy") public void importProfileTypeCopy(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: importprofiletype/{key}/copy?collection={collectionKey}

      Copy import profile type defined by key.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.importProfileTypeCopy(ImportProfileType)
    • importProfileTypeRemoveImportMap

      @DELETE @Path("importprofiletype/{key}/map/{ipTypeMapKey}/remove") public void importProfileTypeRemoveImportMap(@PathParam("key") String key, @PathParam("ipTypeMapKey") String importMapKey) throws ApplicationException
      DELETE: importprofiletype/{key}/map/{ipTypeMapKey}/remove

      Remove the import map from the import profile type.

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.importProfileTypeRemoveImportMap(ImportProfileType, ImportProfileTypeMap)
    • channelMapInsert

      @POST @Path("channelmap/{channelMapName}") public <T extends ChannelMapBase> javax.ws.rs.core.Response channelMapInsert(@PathParam("channelMapName") String channelMapName) throws UserException, ApplicationException, IOException
      POST: channelmap/{channelMapName}?data=[jsonDataMap]

      Insert a new channel map (PublicationProfileMap, PublicationProfileTypeMap, ImportProfileMap or ImportProfileTypeMap) with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.channelMapSave(ChannelMapBase, DataMap)
    • channelMapEdit

      @POST @Path("channelmap/{channelMapName}/{key}") public <T extends ChannelMapBase> javax.ws.rs.core.Response channelMapEdit(@PathParam("key") String key, @PathParam("channelMapName") String channelMapName) throws UserException, ApplicationException, IOException
      POST: channelmap/{channelMapName}/{key}?data=[jsonDataMap]

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

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • ChannelAPI.channelMapSave(ChannelMapBase, DataMap)
    • channelMapRemoveChannelMapField

      @DELETE @Path("channelmap/{channelMapName}/{key}/field/{fieldKey}") public <T extends ChannelMapBase> void channelMapRemoveChannelMapField(@PathParam("key") String key, @PathParam("channelMapName") String channelMapName, @PathParam("fieldKey") String fieldKey) throws ApplicationException
      DELETE: channelmap/{channelMapName}/{key}/field/{fieldKey}

      Remove channel map field from channel map

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.channelMapRemoveChannelMapField(ChannelMapBase, ChannelMapField)
    • channelMapChangeOrderOfMapField

      @POST @Path("channelmap/{channelMapName}/{key}/field/{fieldKey}/move") public <T extends ChannelMapBase> void channelMapChangeOrderOfMapField(@PathParam("key") String key, @PathParam("channelMapName") String channelMapName, @PathParam("fieldKey") String fieldKey, @QueryParam("up") @DefaultValue("true") boolean decreaseOrder) throws ApplicationException
      POST: channelmap/{channelMapName}/{key}/field/{fieldKey}/move?up=false

      Move channel map field up or down in list of fields of the channel map

      Throws:
      ApplicationException
      See Also:
      • ChannelAPI.channelMapChangeOrderOfMapField(ChannelMapBase, ChannelMapField, boolean)
    • importChannelMap

      @POST @Path("channelmap/{channelMapName}/{key}/fieldimport") @Produces("text/plain") public String importChannelMap(@PathParam("key") String key, @PathParam("channelMapName") String channelMapName, @QueryParam("overwrite") boolean overwrite) throws ApplicationException, IOException
      POST: channelmap/{channelMapName}/{key}/fieldimport?overwrite=false

      import channel map fields from excel with fix defined format. send excel file in form POST body. append fields, optionally overwrite. format description and example see MC-6829.

      Throws:
      ApplicationException
      IOException
      See Also:
    • publicationProfileSave

      public PublicationProfile publicationProfileSave(PublicationProfile publicationProfile, DataMap dataMap) throws ApplicationException
      Inserts or updates given NavigationHrcType by setting its fields from given dataMap.
      The PublicationProfileType must be provided, either as attached entity in field or as id in the dataMap.
      Parameters:
      publicationProfile - mandatory
      dataMap - mandatory, contains values for the PublicationProfile's fields as key-value pairs
      Returns:
      inserted or updated PublicationProfile. If PublicationProfile has been inserted if contains now the newly created id
      Throws:
      ApplicationException
    • publicationProfileCopy

      public PublicationProfile publicationProfileCopy(PublicationProfile publicationProfile, Collection targetCollection) throws ApplicationException
      Creates a copy of given publicationProfile and inserts it in targetCollection if given, otherwise in collection of source publicationProfile.
      required right: RightType.INSERT by targetCollection

      Parameters:
      publicationProfile - mandatory
      targetCollection - optional
      Returns:
      copy of publicationProfile
      Throws:
      ApplicationException
      See Also:
    • publicationProfileDelete

      public void publicationProfileDelete(PublicationProfile publicationProfile) throws ApplicationException
      Removes PublicationProfile from database.
      Parameters:
      publicationProfile - mandatory
      Throws:
      ApplicationException
    • publicationProfileSetLocales

      public void publicationProfileSetLocales(PublicationProfile publicationProfile, List<PublicationProfileLocale> ppLocales) throws ApplicationException
      Sets the PublicationProfileLocales for PublicationProfile by overwriting any previous assignments.
      PublicationProfileLocales hold information about primary and additional locales and their respective replacements locale.
      The PublicationProfileLocales must be new entities and will be inserted.
      Parameters:
      publicationProfile - mandatory
      ppLocales - mandatory
      Throws:
      ApplicationException
    • publicationProfileAddNavigationHierarchy

      public void publicationProfileAddNavigationHierarchy(PublicationProfile publicationProfile, NavigationHrc navigationHrc, int prio) throws ApplicationException
      Adds NavigationHrc to given publicationProfile.
      required right: RightType.EDIT by publicationProfile

      Parameters:
      publicationProfile - mandatory
      navigationHrc - mandatory
      prio - currently not used ??????
      Throws:
      ApplicationException
    • publicationProfileRemoveNavigationHierarchy

      public void publicationProfileRemoveNavigationHierarchy(PublicationProfile publicationProfile, NavigationHrc navigationHrc, boolean force) throws ApplicationException
      Removes assigned NavigationHrc from given PublicationProfile.
      Parameters:
      publicationProfile - mandatory, must be attached
      navigationHrc - mandatory
      Throws:
      ApplicationException
    • publicationProfileChangeOrderOfNavigationHierarchies

      public void publicationProfileChangeOrderOfNavigationHierarchies(PublicationProfile publicationProfile, NavigationHrc navigationHrc, boolean decreaseOrder) throws ApplicationException
      Increases or decreases prio of assignment given navigation hierarchies.
      Sets prio of all navigation hierarchies of this publication profile accordingly, starting with 1.
      Checks for permission EDIT
      Parameters:
      publicationProfile - PublicationProfile mandatory
      navigationHrc - NavigationHrc mandatory
      decreaseOrder - true if navigationHrc is to move up one step in list, for move down set to false
      Throws:
      UserException
      ApplicationException
    • publicationProfileChangeOrderOfNavigationHierarchies

      public void publicationProfileChangeOrderOfNavigationHierarchies(PublicationProfile publicationProfile, NavigationHrc navigationHrc, int targetPosition) throws ApplicationException
      Changes place of navigation hierarchy to targetPosition in list of assignment given navigation hierarchies
      Parameters:
      publicationProfile - PublicationProfile mandatory
      navigationHrc - NavigationHrc mandatory
      targetPosition - position which given entity should be in after sort, positions in list start with 1. Target position can be smaller or bigger than current position, if equal, nothing happens.
      Throws:
      ApplicationException
    • publicationProfileRemovePublicationMap

      public void publicationProfileRemovePublicationMap(PublicationProfile publicationProfile, PublicationProfileMap publicationMap) throws ApplicationException
      Removes PublicationProfileMap from PublicationProfile with and deletes the PublicationProfileMap. All ChannelMapFields of this PublicationProfileMap with their settings will be deleted with the map.
      Parameters:
      publicationProfile - mandatory
      publicationMap - mandatory
      Throws:
      ApplicationException
    • publicationProfilesGetForSearchResult

      public List<PublicationProfile> publicationProfilesGetForSearchResult(mc.core.system.search.SearchResult searchResult) throws ApplicationException
      Returns all publicationProfiles with flag searchResultPublication=true and, if profileType=flatFile, where nodeType of publication map equals nodeType of nodes in search result.
      Parameters:
      searchResult - Search result, must not be null
      Returns:
      Matching publication profiles.
      Throws:
      ApplicationException
    • publicationProfilePerformExport

      public void publicationProfilePerformExport(PublicationProfile publicationProfile) throws UserException, ApplicationException
      Starts the export defined by this publicationProfile by starting the assigned workflowType.
      With this a Publication object is created which is associated with a Report, both of which are stored in the database when the export is finished the Report holds any error and info messages created during the workflow.
      If a file is created by the export it is stored with the Publication.
      required right: RightType.EXECUTE by publicationProfile

      Parameters:
      publicationProfile - mandatory
      Throws:
      UserException - with message key message.workflow.info.started to signal start of workflow.
      ApplicationException - on any error
    • publicationProfilePerformExport

      public void publicationProfilePerformExport(PublicationProfile publicationProfile, String searchResultId) throws UserException, ApplicationException
      Starts the export defined by this publicationProfile and with data from previous search defined by searchResultId.
      required right: RightType.EXECUTE by publicationProfile

      Parameters:
      publicationProfile - mandatory
      searchResultId - mandatory, must be valid resultId from a prior search
      Throws:
      UserException - with message key message.workflow.info.started to signal start of workflow.
      ApplicationException - on any error
    • publicationProfilePerformExport

      public void publicationProfilePerformExport(PublicationProfile publicationProfile, mc.core.system.search.SearchResult searchResult) throws UserException, ApplicationException
      Starts the export defined by this publicationProfile and with data from an earlier search.
      required right: RightType.EXECUTE by publicationProfile

      Parameters:
      publicationProfile - Description for export contents. Must not be null.
      searchResult - Result of an earlier search. Must not be null.
      Throws:
      UserException - with message key message.workflow.info.started to signal start of workflow.
      ApplicationException - on any error
    • publicationProfilePerformExport

      public void publicationProfilePerformExport(PublicationProfile publicationProfile, Basket basket) throws UserException, ApplicationException
      Starts the export defined by this publicationProfile and with data defined by basket.
      Parameters:
      publicationProfile - mandatory
      basket - mandatory
      Throws:
      UserException - with message key message.workflow.info.started to signal start of workflow.
      ApplicationException - on any error
    • publicationDelete

      public void publicationDelete(Publication publication) throws ApplicationException
      Removes given publication from database. If report associated with publication is not used elsewhere also deletes the report.
      Parameters:
      publication - mandatory
      Throws:
      ApplicationException
    • publicationProfileTypeSave

      public PublicationProfileType publicationProfileTypeSave(PublicationProfileType publicationProfileType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given PublicationProfileType by setting its fields from given dataMap.
      required user role: UserBaseRole.CONFIGADMIN

      Parameters:
      publicationProfileType - mandatory
      dataMap - mandatory, contains values for the NavigationHrcType's fields as key-value pairs
      Returns:
      inserted or updated PublicationProfileType.
      If PublicationProfileType has been inserted if contains now the newly created id
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • publicationProfileTypeCopy

      public PublicationProfileType publicationProfileTypeCopy(PublicationProfileType publicationProfileType) throws UserException, ApplicationException
      Creates a copy of given PublicationProfileType.
      required user role: only UserBaseRole.CONFIGADMIN

      Parameters:
      publicationProfileType - mandatory
      Returns:
      the copy
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
      See Also:
    • publicationProfileTypeDelete

      public void publicationProfileTypeDelete(PublicationProfileType publicationProfileType) throws UserException, DeleteTiedElementException, ApplicationException
      Checks if PublicationProfileType is referenced by PublicationProfile. If not, removes it from database.
      required user role: only UserBaseRole.CONFIGADMIN

      Parameters:
      publicationProfileType - mandatory
      Throws:
      UserException - if user has not role CONFIGADMIN
      DeleteTiedElementException - if publication profile type is in use
      ApplicationException
      See Also:
      • for usage of PublicationProfileType
    • publicationProfileTypeRemovePublicationMap

      public void publicationProfileTypeRemovePublicationMap(PublicationProfileType publicationProfileType, PublicationProfileTypeMap publicationMap) throws UserException, ApplicationException
      Removes PublicationProfileTypeMap from PublicationProfileType and deletes the PublicationProfileTypeMap.
      All ChannelMapFields of this PublicationProfileTypeMap with their settings will be deleted with the map.
      required user role: only UserBaseRole.CONFIGADMIN

      Parameters:
      publicationProfileType - mandatory
      publicationMap - mandatory
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • importProfileSave

      public ImportProfile importProfileSave(ImportProfile importProfile, DataMap dataMap) throws ApplicationException
      Inserts or updates given ImportProfile by setting its fields from given dataMap. The ImportProfileType must be provided, either as attached entity in field or as id in the dataMap if the PublicationProfileType is new.
      Parameters:
      importProfile - mandatory
      dataMap - mandatory, contains values for the ImportProfile's fields as key-value pairs
      Returns:
      inserted or updated ImportProfile. If ImportProfile has been inserted if contains now the newly created id
      Throws:
      ApplicationException
    • importProfileCopy

      public ImportProfile importProfileCopy(ImportProfile importProfile) throws ApplicationException
      Creates of copy of given importProfile including the ImportMap with its ChannelMapFields.
      Parameters:
      importProfile - mandatory
      Returns:
      copy
      Throws:
      ApplicationException
      See Also:
    • importProfileDelete

      public void importProfileDelete(ImportProfile importProfile) throws ApplicationException
      Removes ImportProfile from database.
      Parameters:
      importProfile - mandatory
      Throws:
      ApplicationException
    • importProfileRemoveImportMap

      public void importProfileRemoveImportMap(ImportProfile importProfile, ImportProfileMap importMap) throws ApplicationException
      Removes ImportProfileMap from ImportProfileand deletes the ImportProfileMap from DB. All ChannelMapFields of this ImportProfileMap with their settings will be deleted with the map.
      Parameters:
      importProfile - mandatory
      importMap - mandatory
      Throws:
      ApplicationException
    • importProfileSetImportFile

      public void importProfileSetImportFile(ImportProfile importProfile, InputStream file, String filename) throws ApplicationException
      Stores the current file which contains the data to be imported with the ImportProfile in the file content store. This method must be called before starting the import.
      Parameters:
      importProfile - mandatory
      file - mandatory, must be open
      filename - mandatory
      Throws:
      ApplicationException
    • importProfileCreateTemplate

      public void importProfileCreateTemplate(ImportProfile importProfile, OutputStream os) throws ApplicationException
      generate with help of export channel the template file with header for fields in channel map of import profile. (export of empty export data with map from import profile) use for flat file import profiles with import channel map only.
      Parameters:
      importProfile - mandatory
      os - mandatory
      Throws:
      ApplicationException
    • importProfilePerformImport

      public void importProfilePerformImport(ImportProfile importProfile) throws UserException, ApplicationException
      Starts the import defined by this importProfile by starting the assigned workflowType. With this an Import object is created which is associated with a Report, both of which are stored in the database when the import is finished the Report holds any error and info messages created during the workflow. If the imported data was provided by a file this file is stored with the Import.
      required right: RightType.EXECUTE by importProfile

      Parameters:
      importProfile - mandatory
      Throws:
      ApplicationException
      UserException - with message key message.workflow.info.started to signal start of workflow.
    • importProfilePerformImport

      public void importProfilePerformImport(ImportProfile importProfile, String fileId, String filename) throws UserException, ApplicationException
      Starts the import defined by this importProfile by starting the assigned workflowType. With this an Import object is created which is associated with a Report, both of which are stored in the database when the import is finished the Report holds any error and info messages created during the workflow.
      required right: RightType.EXECUTE by importProfile

      Parameters:
      importProfile - mandatory
      fileId - optional
      filename - optional, define the file with import data
      if fileId or fileName is null, starts import with file from this importProfile.
      Throws:
      ApplicationException
      UserException - with message key message.workflow.info.started to signal start of workflow.
    • importDelete

      public void importDelete(Import importEntity) throws ApplicationException
      Removes given import entity from database. If report associated with import is not used elsewhere also deletes the report.
      Parameters:
      importEntity - mandatory
      Throws:
      ApplicationException
    • importProfileTypeSave

      public ImportProfileType importProfileTypeSave(ImportProfileType importProfileType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given ImportProfileType by setting its fields from given dataMap.
      The WorkflowType must be provided, either as attached entity in field or as id in the dataMap if the PublicationProfileType is new.
      required user role: UserBaseRole.CONFIGADMIN

      Parameters:
      importProfileType - mandatory
      dataMap - mandatory, contains values for the ImportProfileType's fields as key-value pairs
      Returns:
      inserted or updated ImportProfileType. If ImportProfileType has been inserted if contains now the newly created id
      Throws:
      UserException - if user has not user role CONFIGADMIN
      ApplicationException
    • importProfileTypeCopy

      public ImportProfileType importProfileTypeCopy(ImportProfileType importProfileType) throws UserException, ApplicationException
      Creates a copy of the given ImportProfileType including the ImportMap with its ChannelMapFields.
      required user role: UserBaseRole.CONFIGADMIN

      Parameters:
      importProfileType - mandatory
      Returns:
      the copy
      Throws:
      UserException - if user has not user role CONFIGADMIN
      ApplicationException
      See Also:
    • importProfileTypeDelete

      public void importProfileTypeDelete(ImportProfileType importProfileType) throws UserException, ApplicationException
      Checks if ImportProfileType is referenced by ImportProfile. If not, removes it from database.
      required user role: UserBaseRole.CONFIGADMIN

      Parameters:
      importProfileType - mandatory
      Throws:
      ApplicationException
      UserException - if ImportProfileType is in use or user has not user role CONFIGADMIN
      See Also:
      • for usage of ImportProfileType
    • importProfileTypeRemoveImportMap

      public void importProfileTypeRemoveImportMap(ImportProfileType importProfileType, ImportProfileTypeMap importMap) throws UserException, ApplicationException
      Removes ImportProfileTypeMap with given id from ImportProfileType with given id and deletes the ImportProfileTypeMap. All ChannelMapFields of this ImportProfileTypeMap with their settings will be deleted with the map.
      required user role: UserBaseRole.CONFIGADMIN

      Parameters:
      importProfileType - mandatory
      importMap - mandatory
      Throws:
      UserException - if user has not user role CONFIGADMIN
      ApplicationException
    • channelMapSave

      public <T extends ChannelMapBase> T channelMapSave(T channelMap, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given ChannelMapBase by setting its fields from given dataMap. The ChannelMapType must be provided.
      required user role: UserBaseRole.CONFIGADMIN

      Parameters:
      channelMap - mandatory
      dataMap - mandatory, contains values for the ChannelMapBase's fields as key-value pairs
      Returns:
      inserted or updated ChannelMapBase. If ChannelMapBase has been inserted if contains now the newly created id
      Throws:
      UserException - if user has not user role CONFIGADMIN
      ApplicationException
    • channelMapRemoveChannelMapField

      public void channelMapRemoveChannelMapField(ChannelMapBase channelMap, ChannelMapField channelMapField) throws ApplicationException
      Removes ChannelMapField with g from given ChannelMapBase (can be PublicationProfileMap, PublicationProfileTypeMap, ImportProfileMap or ImportProfileTypeMap).
      Parameters:
      channelMap - mandatory
      channelMapField - mandatory
      Throws:
      ApplicationException
    • channelMapFieldSave

      public ChannelMapField channelMapFieldSave(ChannelMapField channelMapField, DataMap dataMap) throws ApplicationException
      Inserts or updates given ChannelMapField by setting its fields from given paramMap.
      Parameters:
      channelMapField - mandatory
      dataMap - mandatory, contains values for the ChannelMapField's fields as key-value pairs
      Returns:
      inserted or updated ChannelMapField. If ChannelMapField has been inserted if contains now the newly created id
      Throws:
      ApplicationException
    • channelMapChangeOrderOfMapField

      public void channelMapChangeOrderOfMapField(ChannelMapBase channelMap, ChannelMapField channelMapField, boolean decreaseOrder) throws ApplicationException
      Increases or decreases prio of ChannelMapField within list of all ChannelMapField of this channelMap.
      Sets prio of all ChannelMapField of this ChannelMapBase accordingly.
      Parameters:
      channelMap - mandatory
      channelMapField - mandatory
      decreaseOrder - true if ChannelMapField is to move up one step in list, for move down set to false
      Throws:
      ApplicationException