@Service(value="externalObjectManagement") public class ExternalObjectManagementImpl extends ExternalObjectManagementBase
Constructor and Description |
---|
ExternalObjectManagementImpl() |
assignExternalObject, assignOrUpdateExternalObjects, getExternalObjects, isExternalObjectAssigned, removeExternalObject, removeExternalObject, removeExternalObjectTrusted, replaceExternalObjects, updateExternalObject
public <T> T getExternalObject(Long topicId, Long externalObjectId, Converter<Pair<Blog,ExternalObject>,T> converter) throws BlogAccessException, BlogNotFoundException
ExternalObjectManagement
topicId
- the ID of the topicexternalObjectId
- the internal ID of the external objectconverter
- the converter to transform the external object in the result objectBlogAccessException
- in case the current user has no access to the given topicBlogNotFoundException
- in case the topic does not existprotected ExternalObject handleAssignExternalObject(Long blogId, ExternalObject externalObject) throws BlogNotFoundException, BlogAccessException, ExternalObjectAlreadyAssignedException, TooManyExternalObjectsPerTopicException, ExternalSystemNotConfiguredException
ExternalObjectManagementBase
ExternalObjectManagementBase.assignExternalObject(Long, ExternalObject)
handleAssignExternalObject
in class ExternalObjectManagementBase
blogId
- the ID of the blog to assign the external object toexternalObject
- object describing the external object to assignBlogNotFoundException
- in case the topic was not foundBlogAccessException
- in case the user is not a manager of the blogExternalObjectAlreadyAssignedException
- in case the external object is assigned to another blog than the provided oneTooManyExternalObjectsPerTopicException
ExternalSystemNotConfiguredException
protected void handleAssignOrUpdateExternalObjects(Long blogId, Collection<ExternalObject> externalObjects) throws BlogNotFoundException, BlogAccessException, ExternalObjectAlreadyAssignedException, TooManyExternalObjectsPerTopicException, ExternalSystemNotConfiguredException
ExternalObjectManagementBase
ExternalObjectManagementBase.assignOrUpdateExternalObjects(Long, Collection)
handleAssignOrUpdateExternalObjects
in class ExternalObjectManagementBase
blogId
- the ID of the blog to assign the external objects toexternalObjects
- objects describing the external objects to assign or update. To find an existing
external object the external ID and the external system ID members are used if set
otherwise the ID member is used.BlogNotFoundException
- in case the blog was not foundBlogAccessException
- in case the user is not a manager of the blogExternalObjectAlreadyAssignedException
- in case one of the external objects is assigned to another blog than the provided
oneTooManyExternalObjectsPerTopicException
ExternalSystemNotConfiguredException
protected Collection<ExternalObject> handleGetExternalObjects(Long topicId) throws BlogNotFoundException, BlogAccessException
ExternalObjectManagementBase
ExternalObjectManagementBase.getExternalObjects(Long)
handleGetExternalObjects
in class ExternalObjectManagementBase
topicId
- the ID of the blogBlogNotFoundException
- in case the blog does not existBlogAccessException
- in case the current user has no read access to the blogprotected boolean handleIsExternalObjectAssigned(Long blogId, String externalSystemId, String externalObjectId) throws BlogNotFoundException, BlogAccessException
ExternalObjectManagementBase
handleIsExternalObjectAssigned
in class ExternalObjectManagementBase
blogId
- the ID of the blog the external object is checked for beeing assigned toexternalSystemId
- the ID of the external systemexternalObjectId
- the ID that identifies the external object within the external systemBlogNotFoundException
- in case there is no blog for the given IDBlogAccessException
- in case the current user has no read access to the blogprotected void handleRemoveExternalObject(Long externalObjectId) throws NotFoundException, BlogAccessException
ExternalObjectManagementBase
ExternalObjectManagementBase.removeExternalObject(Long)
handleRemoveExternalObject
in class ExternalObjectManagementBase
externalObjectId
- the ID of the external object to removeNotFoundException
- in case the external object does not existBlogAccessException
- in case the current user is not manager of the blogprotected void handleRemoveExternalObject(Long blogId, String externalSystemId, String externalObjectId) throws BlogNotFoundException, BlogAccessException
ExternalObjectManagementBase
ExternalObjectManagementBase.removeExternalObject(Long, String, String)
handleRemoveExternalObject
in class ExternalObjectManagementBase
blogId
- ID of the blogexternalSystemId
- identifier of the external systemexternalObjectId
- identifier of the external object in the external systemBlogNotFoundException
- in case the blog does not existBlogAccessException
- in case the current user is not manager of the blogprotected void handleRemoveExternalObjectTrusted(Long externalObjectId) throws NotFoundException, AuthorizationException
ExternalObjectManagementBase.removeExternalObjectTrusted(Long)
handleRemoveExternalObjectTrusted
in class ExternalObjectManagementBase
externalObjectId
- ID of the external object *NotFoundException
- in case the external object does not existAuthorizationException
- in case the current user is not client managerprotected void handleReplaceExternalObjects(Long blogId, Collection<ExternalObject> externalObjects) throws BlogNotFoundException, BlogAccessException, ExternalObjectAlreadyAssignedException, TooManyExternalObjectsPerTopicException, ExternalSystemNotConfiguredException
ExternalObjectManagementBase
ExternalObjectManagementBase.replaceExternalObjects(Long, Collection)
handleReplaceExternalObjects
in class ExternalObjectManagementBase
blogId
- the ID of the blog whose external objects should be replacedexternalObjects
- the new external objects to replace the existing withBlogNotFoundException
- in case the blog does not existBlogAccessException
- in case the current user is not manager of the blogExternalObjectAlreadyAssignedException
- in case one of the external objects is assigned to another blog than the provided
oneTooManyExternalObjectsPerTopicException
ExternalSystemNotConfiguredException
protected ExternalObject handleUpdateExternalObject(Long blogId, ExternalObject newExternalObject) throws BlogNotFoundException, BlogAccessException, NotFoundException, ExternalObjectAlreadyAssignedException
ExternalObjectManagementBase
ExternalObjectManagementBase.updateExternalObject(Long, ExternalObject)
handleUpdateExternalObject
in class ExternalObjectManagementBase
blogId
- the ID of the blog the external object is assigned tonewExternalObject
- object with details about the external object which are used to resolve the
assigned object and update its dataBlogNotFoundException
- in case the blog does not existBlogAccessException
- in case the current user is not manager of the blogNotFoundException
- in case the external object does not existExternalObjectAlreadyAssignedException
- in case the external object is already assigned to another blog than the provided
one@Transactional(readOnly=true) public boolean hasExternalObjects(Long blogId) throws BlogNotFoundException, BlogAccessException
ExternalObjectManagement
Return whether a given blog has external objects.
blogId
- the ID of the blogBlogNotFoundException
- in case the blog does not existBlogAccessException
- in case the current user has no read access to the blog@Transactional(propagation=NEVER) public void registerExternalObjectSource(ExternalObjectSource source) throws ExternalObjectSourceAlreadyExistsException
ExternalObjectManagement
source
- the source to registerExternalObjectSourceAlreadyExistsException
- in case there is already a source with the same ID@Transactional(propagation=NEVER) public void unregisterExternalObjectSource(ExternalObjectSource source)
ExternalObjectManagement
ExternalObjectManagement.registerExternalObjectSource(ExternalObjectSource)
. If the source was not registered
the call is ignoredsource
- the source to removeCopyright © 2019 Communote team. All rights reserved.