Class ObjectFacadeImpl
java.lang.Object
com.riadalabs.jira.plugins.insight.channel.external.api.facade.impl.ObjectFacadeImpl
- All Implemented Interfaces:
ObjectFacade
-
Constructor Summary
ConstructorsConstructorDescriptionObjectFacadeImpl(com.riadalabs.jira.plugins.insight.services.core.ObjectService objectService, com.riadalabs.jira.plugins.insight.services.core.MoveService moveService, com.riadalabs.jira.plugins.insight.services.util.ErrorMessageTranslator errorMessageTranslator, com.riadalabs.jira.plugins.insight.services.jira.JIRAPluginService jiraPluginService, io.riada.insight.index.filter.objectticketconnection.ObjectTicketConnectionFilter objectTicketConnectionFilter, com.riadalabs.jira.plugins.insight.services.avatar.ObjectAvatarService avatarService, com.riadalabs.jira.plugins.insight.services.validation.ValidateObject validateObject, com.riadalabs.jira.plugins.insight.services.core.archiving.ArchiveService archiveService) -
Method Summary
Modifier and TypeMethodDescriptionaddAttachmentBean(int objectId, File file, String fileName, String contentType, String comment) Add aAttachmentBeandomain objects.voidarchiveObjectBean(int id) Archive anObjectBeanby ID.voidarchiveObjectBean(int id, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Archive anObjectBeanby ID with control over the event dispatch option.voidarchiveObjectBean(String objectKey) Archive anObjectBeanby object key.voidarchiveObjectBean(String objectKey, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Archive anObjectBeanby object key with control over the event dispatch option.intcountObjectBeans(int objectTypeId) Finds total count of allObjectBeandomain objects.createWatcherBean(int objectId, String userKey) Created aWatcherBeandeleteAttachmentBean(int attachmentId) DeleteAttachmentBeanvoiddeleteCommentBean(int commentBeanId) Delete aCommentBeanvoiddeleteObjectAttributeBean(int id) Deprecated.voiddeleteObjectAttributeBean(int id, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Deprecated.voiddeleteObjectAttributeBean(long id) Deletes an object attribute beanvoiddeleteObjectAttributeBean(long id, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Deletes an object attribute beanvoiddeleteObjectBean(int id) Delete aObjectBeanvoiddeleteObjectBean(int id, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Delete aObjectBeanvoiddeleteWatcherBean(WatcherBean watcherBean) Delete aWatcherBeanfindAttachmentBeans(int objectId) Finds attachmentBeans for specifiedObjectBeanidfindCommentBeans(int objectId) Find allCommentBeanfor anObjectBeanfindObjectAttributeBeans(int objectId) Finds allObjectAttributeBeanfindObjectHistoryBean(int objectId) Find theObjectBeanhistoryfindObjectTicketConnections(int objectId) Find all JIRA issues connected to anObjectBeanfindObjectTicketConnections(int objectId, int offset, int limit) findObjectTicketConnections(long ticketId) Find all ObjectBean connected to a JIRA issuefindWatcherBeans(int objectId) Finds allWatcherBeanfor anObjectBeanloadAttachmentBeanById(int id) Load aAttachmentBeanloadCommentBean(int commentId) Load aCommentBeanloadObjectAttributeBean(int id) Deprecated.Will be removed.loadObjectAttributeBean(int objectId, int objectTypeAttributeId) Loads aObjectAttributeBeangiven an object id and object type attribute idloadObjectAttributeBean(int objectId, int objectTypeAttributeId, boolean ignorePermissionCheck) Loads aObjectAttributeBeangiven an object id, object type attribute id and a parameter to ignore permission checkloadObjectAttributeBean(int objectId, String objectTypeAttributeName) Loads aObjectAttributeBeangiven an object id and object type attribute nameloadObjectBean(int id) Loads aObjectBeangiven its id.loadObjectBean(String key) Loads aObjectBeangiven its key.loadWatcherBean(int objectId, String userKey) Loads aWatcherBeanmoveObjects(MoveObjectBean moveObjectBean) Move objects to another object typevoidrestoreObjectBean(int id) Restore anObjectBeanby ID.voidrestoreObjectBean(int id, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Restore anObjectBeanby ID with control over the event dispatch option.voidrestoreObjectBean(String objectKey) Restore anObjectBeanby object key.voidrestoreObjectBean(String objectKey, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Restore anObjectBeanby object key with control over the event dispatch option.storeCommentBean(CommentBean commentBean) Store aCommentBeanstoreObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean) Stores aObjectAttributeBeanstoreObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Stores aObjectAttributeBeanstoreObjectAttributeBean(ObjectAttributeBean objectAttributeBean) storeObjectBean(MutableObjectBean objectBean) Stores aObjectBeanstoreObjectBean(MutableObjectBean objectBean, byte[] avatarData, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Stores aObjectBeanwith the corresponding avatarstoreObjectBean(MutableObjectBean objectBean, com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) Stores aObjectBeanStores aObjectBeanbypassing ALL attribute validation e.g. uniqueness.voidvalidateObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean, ObjectBean objectBean) Validate an object attribute bean.voidvalidateObjectBean(MutableObjectBean objectBean) Validate an object bean.
-
Constructor Details
-
ObjectFacadeImpl
public ObjectFacadeImpl(com.riadalabs.jira.plugins.insight.services.core.ObjectService objectService, com.riadalabs.jira.plugins.insight.services.core.MoveService moveService, com.riadalabs.jira.plugins.insight.services.util.ErrorMessageTranslator errorMessageTranslator, com.riadalabs.jira.plugins.insight.services.jira.JIRAPluginService jiraPluginService, io.riada.insight.index.filter.objectticketconnection.ObjectTicketConnectionFilter objectTicketConnectionFilter, com.riadalabs.jira.plugins.insight.services.avatar.ObjectAvatarService avatarService, com.riadalabs.jira.plugins.insight.services.validation.ValidateObject validateObject, com.riadalabs.jira.plugins.insight.services.core.archiving.ArchiveService archiveService)
-
-
Method Details
-
storeObjectBean
public ObjectBean storeObjectBean(MutableObjectBean objectBean, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeStores aObjectBean- Specified by:
storeObjectBeanin interfaceObjectFacade- Parameters:
objectBean- the object bean to storeeventDispatchOption- event dispatch- Returns:
- the stored
ObjectBean - Throws:
InsightException- if something goes wrong
-
storeObjectBean
public ObjectBean storeObjectBean(@Nonnull MutableObjectBean objectBean, @Nonnull byte[] avatarData, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeStores aObjectBeanwith the corresponding avatar- Specified by:
storeObjectBeanin interfaceObjectFacade- Parameters:
objectBean- an existing object bean, the object bean must exist and be stored in insight before added as a parameter to this methodavatarData- the actual avatar data to be used for the objecteventDispatchOption- event dispatch- Returns:
- the stored
ObjectBean - Throws:
InsightException- if something goes
-
storeObjectBean
Description copied from interface:ObjectFacadeStores aObjectBean- Specified by:
storeObjectBeanin interfaceObjectFacade- Parameters:
objectBean- the object bean to store- Returns:
- the stored
ObjectBean - Throws:
InsightException- if something goes wrong
-
storeObjectBeanIgnoreAttributeValidation
public ObjectBean storeObjectBeanIgnoreAttributeValidation(MutableObjectBean objectBean) throws InsightException Description copied from interface:ObjectFacadeStores aObjectBeanbypassing ALL attribute validation e.g. uniqueness. This method should be used with care because it will create objects that potentially does not conform to the configuration of the object type.- Specified by:
storeObjectBeanIgnoreAttributeValidationin interfaceObjectFacade- Parameters:
objectBean- the object bean with corresponding attributes. Attributes present will NOT be validated- Returns:
- the stored object bean
- Throws:
InsightException
-
storeObjectAttributeBean
public ObjectAttributeBean storeObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean) throws InsightException Description copied from interface:ObjectFacadeStores aObjectAttributeBean- Specified by:
storeObjectAttributeBeanin interfaceObjectFacade- Returns:
- the stored
ObjectAttributeBean - Throws:
InsightException- if something goes wrong
-
storeObjectAttributeBean
public ObjectAttributeBean storeObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeStores aObjectAttributeBean- Specified by:
storeObjectAttributeBeanin interfaceObjectFacade- Returns:
- the stored
ObjectAttributeBean - Throws:
InsightException- if something goes wrong
-
storeObjectAttributeBean
public ObjectAttributeBean storeObjectAttributeBean(ObjectAttributeBean objectAttributeBean) throws InsightException - Specified by:
storeObjectAttributeBeanin interfaceObjectFacade- Throws:
InsightException
-
countObjectBeans
Description copied from interface:ObjectFacadeFinds total count of allObjectBeandomain objects.- Specified by:
countObjectBeansin interfaceObjectFacade- Returns:
- the number of ObjectTypes
- Throws:
InsightException
-
loadObjectBean
Description copied from interface:ObjectFacadeLoads aObjectBeangiven its id.- Specified by:
loadObjectBeanin interfaceObjectFacade- Returns:
- a
ObjectBean - Throws:
InsightException
-
loadObjectBean
Description copied from interface:ObjectFacadeLoads aObjectBeangiven its key.- Specified by:
loadObjectBeanin interfaceObjectFacade- Returns:
- a
ObjectBean - Throws:
InsightException
-
deleteObjectBean
public void deleteObjectBean(int id, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeDelete aObjectBean- Specified by:
deleteObjectBeanin interfaceObjectFacade- Throws:
InsightException
-
deleteObjectBean
Description copied from interface:ObjectFacadeDelete aObjectBean- Specified by:
deleteObjectBeanin interfaceObjectFacade- Throws:
InsightException
-
archiveObjectBean
Description copied from interface:ObjectFacadeArchive anObjectBeanby ID.- Specified by:
archiveObjectBeanin interfaceObjectFacade- Parameters:
id- the id of the object to archive- Throws:
InsightException
-
archiveObjectBean
public void archiveObjectBean(int id, @NotNull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeArchive anObjectBeanby ID with control over the event dispatch option.- Specified by:
archiveObjectBeanin interfaceObjectFacade- Parameters:
id- the id of the object to archiveeventDispatchOption- event dispatch option- Throws:
InsightException
-
archiveObjectBean
Description copied from interface:ObjectFacadeArchive anObjectBeanby object key.- Specified by:
archiveObjectBeanin interfaceObjectFacade- Parameters:
objectKey- the key of the object to archive- Throws:
InsightException
-
archiveObjectBean
public void archiveObjectBean(String objectKey, @NotNull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeArchive anObjectBeanby object key with control over the event dispatch option.- Specified by:
archiveObjectBeanin interfaceObjectFacade- Parameters:
objectKey- the key of the object to archiveeventDispatchOption- event dispatch option- Throws:
InsightException
-
restoreObjectBean
Description copied from interface:ObjectFacadeRestore anObjectBeanby ID.- Specified by:
restoreObjectBeanin interfaceObjectFacade- Parameters:
id- the id of the object to restore- Throws:
InsightException
-
restoreObjectBean
public void restoreObjectBean(int id, @NotNull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeRestore anObjectBeanby ID with control over the event dispatch option.- Specified by:
restoreObjectBeanin interfaceObjectFacade- Parameters:
id- the id of the object to restoreeventDispatchOption- event dispatch option- Throws:
InsightException
-
restoreObjectBean
Description copied from interface:ObjectFacadeRestore anObjectBeanby object key.- Specified by:
restoreObjectBeanin interfaceObjectFacade- Parameters:
objectKey- the key of the object to restore- Throws:
InsightException
-
restoreObjectBean
public void restoreObjectBean(String objectKey, @NotNull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeRestore anObjectBeanby object key with control over the event dispatch option.- Specified by:
restoreObjectBeanin interfaceObjectFacade- Parameters:
objectKey- the key of the object to restoreeventDispatchOption- event dispatch option- Throws:
InsightException
-
findObjectAttributeBeans
Description copied from interface:ObjectFacadeFinds allObjectAttributeBean- Specified by:
findObjectAttributeBeansin interfaceObjectFacade- Parameters:
objectId- theObjectBeanid- Returns:
- a list of
ObjectAttributeBean - Throws:
InsightException
-
loadObjectAttributeBean
Deprecated.Will be removed. Use loadObjectAttributeBean(objectId, objectTypeAttributeId) insteadDescription copied from interface:ObjectFacadeLoads aObjectAttributeBeangiven its id.- Specified by:
loadObjectAttributeBeanin interfaceObjectFacade- Returns:
- a
ObjectAttributeBean - Throws:
InsightException
-
loadObjectAttributeBean
public ObjectAttributeBean loadObjectAttributeBean(int objectId, int objectTypeAttributeId) throws InsightException Description copied from interface:ObjectFacadeLoads aObjectAttributeBeangiven an object id and object type attribute id- Specified by:
loadObjectAttributeBeanin interfaceObjectFacade- Returns:
- a
ObjectAttributeBean - Throws:
InsightException
-
loadObjectAttributeBean
public ObjectAttributeBean loadObjectAttributeBean(int objectId, int objectTypeAttributeId, boolean ignorePermissionCheck) throws InsightException Description copied from interface:ObjectFacadeLoads aObjectAttributeBeangiven an object id, object type attribute id and a parameter to ignore permission check- Specified by:
loadObjectAttributeBeanin interfaceObjectFacade- Returns:
- a
ObjectAttributeBean - Throws:
InsightException
-
loadObjectAttributeBean
public ObjectAttributeBean loadObjectAttributeBean(int objectId, String objectTypeAttributeName) throws InsightException Description copied from interface:ObjectFacadeLoads aObjectAttributeBeangiven an object id and object type attribute name- Specified by:
loadObjectAttributeBeanin interfaceObjectFacade- Returns:
- a
ObjectAttributeBean - Throws:
InsightException
-
deleteObjectAttributeBean
Deprecated.Description copied from interface:ObjectFacadeDeletes an object attribute bean- Specified by:
deleteObjectAttributeBeanin interfaceObjectFacade- Throws:
InsightException
-
deleteObjectAttributeBean
@Deprecated public void deleteObjectAttributeBean(int id, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Deprecated.Description copied from interface:ObjectFacadeDeletes an object attribute bean- Specified by:
deleteObjectAttributeBeanin interfaceObjectFacade- Throws:
InsightException
-
deleteObjectAttributeBean
public void deleteObjectAttributeBean(long id, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException Description copied from interface:ObjectFacadeDeletes an object attribute bean- Specified by:
deleteObjectAttributeBeanin interfaceObjectFacade- Throws:
InsightException
-
deleteObjectAttributeBean
Description copied from interface:ObjectFacadeDeletes an object attribute bean- Specified by:
deleteObjectAttributeBeanin interfaceObjectFacade- Throws:
InsightException
-
findObjectHistoryBean
Description copied from interface:ObjectFacadeFind theObjectBeanhistory- Specified by:
findObjectHistoryBeanin interfaceObjectFacade- Returns:
- a list of
ObjectHistoryBean - Throws:
InsightException
-
loadAttachmentBeanById
Description copied from interface:ObjectFacadeLoad aAttachmentBean- Specified by:
loadAttachmentBeanByIdin interfaceObjectFacade- Returns:
- a
AttachmentBean - Throws:
InsightException
-
addAttachmentBean
public AttachmentBean addAttachmentBean(int objectId, File file, String fileName, String contentType, String comment) throws InsightException Description copied from interface:ObjectFacadeAdd aAttachmentBeandomain objects.- Specified by:
addAttachmentBeanin interfaceObjectFacade- Parameters:
objectId- theObjectBeanidfile- the file to addfileName- the filenamecontentType- the content typecomment- an optional comment- Returns:
- the added
AttachmentBean - Throws:
InsightException
-
findAttachmentBeans
Description copied from interface:ObjectFacadeFinds attachmentBeans for specifiedObjectBeanid- Specified by:
findAttachmentBeansin interfaceObjectFacade- Parameters:
objectId- the ObjectBean id- Returns:
- a list of
AttachmentBean - Throws:
InsightException
-
deleteAttachmentBean
Description copied from interface:ObjectFacadeDeleteAttachmentBean- Specified by:
deleteAttachmentBeanin interfaceObjectFacade- Returns:
- the deleted
AttachmentBean - Throws:
InsightException
-
findObjectTicketConnections
public List<ObjectTicketConnectionEntry> findObjectTicketConnections(int objectId) throws InsightException Description copied from interface:ObjectFacadeFind all JIRA issues connected to anObjectBean- Specified by:
findObjectTicketConnectionsin interfaceObjectFacade- Returns:
- list of
ObjectTicketConnectionEntry - Throws:
InsightException
-
findObjectTicketConnections
public List<ObjectTicketConnectionEntry> findObjectTicketConnections(int objectId, int offset, int limit) throws InsightException - Specified by:
findObjectTicketConnectionsin interfaceObjectFacade- Throws:
InsightException
-
findObjectTicketConnections
public List<ObjectTicketConnectionEntry> findObjectTicketConnections(long ticketId) throws InsightException Description copied from interface:ObjectFacadeFind all ObjectBean connected to a JIRA issue- Specified by:
findObjectTicketConnectionsin interfaceObjectFacade- Returns:
- list of
ObjectTicketConnectionEntry - Throws:
InsightException
-
deleteCommentBean
Description copied from interface:ObjectFacadeDelete aCommentBean- Specified by:
deleteCommentBeanin interfaceObjectFacade- Throws:
InsightException
-
storeCommentBean
Description copied from interface:ObjectFacadeStore aCommentBean- Specified by:
storeCommentBeanin interfaceObjectFacade- Returns:
- the stored
CommentBean - Throws:
InsightException
-
findCommentBeans
Description copied from interface:ObjectFacadeFind allCommentBeanfor anObjectBean- Specified by:
findCommentBeansin interfaceObjectFacade- Returns:
- a list of
CommentBean - Throws:
InsightException
-
loadCommentBean
Description copied from interface:ObjectFacadeLoad aCommentBean- Specified by:
loadCommentBeanin interfaceObjectFacade- Returns:
- a
CommentBean - Throws:
InsightException
-
loadWatcherBean
Description copied from interface:ObjectFacadeLoads aWatcherBean- Specified by:
loadWatcherBeanin interfaceObjectFacade- Parameters:
objectId- the ObjectBean iduserKey- the User key- Returns:
- a
WatcherBean - Throws:
InsightException
-
findWatcherBeans
Description copied from interface:ObjectFacadeFinds allWatcherBeanfor anObjectBean- Specified by:
findWatcherBeansin interfaceObjectFacade- Returns:
- a list of
WatcherBean - Throws:
InsightException
-
createWatcherBean
Description copied from interface:ObjectFacadeCreated aWatcherBean- Specified by:
createWatcherBeanin interfaceObjectFacade- Parameters:
objectId- theObjectBeaniduserKey- the userkey- Returns:
- a created
WatcherBean - Throws:
InsightException
-
deleteWatcherBean
Description copied from interface:ObjectFacadeDelete aWatcherBean- Specified by:
deleteWatcherBeanin interfaceObjectFacade- Throws:
InsightException
-
moveObjects
Description copied from interface:ObjectFacadeMove objects to another object type- Specified by:
moveObjectsin interfaceObjectFacade- Returns:
- a
Progress - Throws:
Exception
-
validateObjectBean
public void validateObjectBean(MutableObjectBean objectBean) throws ValidationInsightException, IQLValidationException Description copied from interface:ObjectFacadeValidate an object bean. This will be implicitly be executed on store object- Specified by:
validateObjectBeanin interfaceObjectFacade- Throws:
ValidationInsightExceptionIQLValidationException
-
validateObjectAttributeBean
public void validateObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean, ObjectBean objectBean) throws ValidationInsightException, IQLValidationException Description copied from interface:ObjectFacadeValidate an object attribute bean. This will be implicitly be executed on store object- Specified by:
validateObjectAttributeBeanin interfaceObjectFacade- Throws:
ValidationInsightExceptionIQLValidationException
-