public class ObjectFacadeImpl extends Object implements ObjectFacade
| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
AttachmentBean |
addAttachmentBean(int objectId,
File file,
String fileName,
String contentType,
String comment)
Add a
AttachmentBean domain objects. |
void |
archiveObjectBean(int id)
Archive an
ObjectBean by ID. |
void |
archiveObjectBean(int id,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Archive an
ObjectBean by ID with control over the event dispatch option. |
void |
archiveObjectBean(String objectKey)
Archive an
ObjectBean by object key. |
void |
archiveObjectBean(String objectKey,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Archive an
ObjectBean by object key with control over the event dispatch option. |
int |
countObjectBeans(int objectTypeId)
Finds total count of all
ObjectBean domain objects. |
WatcherBean |
createWatcherBean(int objectId,
String userKey)
Created a
WatcherBean |
AttachmentBean |
deleteAttachmentBean(int attachmentId)
Delete
AttachmentBean |
void |
deleteCommentBean(int commentBeanId)
Delete a
CommentBean |
void |
deleteObjectAttributeBean(int id)
Deprecated.
|
void |
deleteObjectAttributeBean(int id,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Deprecated.
|
void |
deleteObjectAttributeBean(long id)
Deletes an object attribute bean
|
void |
deleteObjectAttributeBean(long id,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Deletes an object attribute bean
|
void |
deleteObjectBean(int id)
Delete a
ObjectBean |
void |
deleteObjectBean(int id,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Delete a
ObjectBean |
void |
deleteWatcherBean(WatcherBean watcherBean)
Delete a
WatcherBean |
List<AttachmentBean> |
findAttachmentBeans(int objectId)
Finds attachmentBeans for specified
ObjectBean id |
List<CommentBean> |
findCommentBeans(int objectId)
Find all
CommentBean for an ObjectBean |
List<ObjectAttributeBean> |
findObjectAttributeBeans(int objectId)
Finds all
ObjectAttributeBean |
List<ObjectHistoryBean> |
findObjectHistoryBean(int objectId)
Find the
ObjectBean history |
List<ObjectTicketConnectionEntry> |
findObjectTicketConnections(int objectId)
Find all JIRA issues connected to an
ObjectBean |
List<ObjectTicketConnectionEntry> |
findObjectTicketConnections(int objectId,
int offset,
int limit) |
List<ObjectTicketConnectionEntry> |
findObjectTicketConnections(long ticketId)
Find all ObjectBean connected to a JIRA issue
|
List<WatcherBean> |
findWatcherBeans(int objectId)
Finds all
WatcherBean for an ObjectBean |
AttachmentBean |
loadAttachmentBeanById(int id)
Load a
AttachmentBean |
CommentBean |
loadCommentBean(int commentId)
Load a
CommentBean |
ObjectAttributeBean |
loadObjectAttributeBean(int id)
Deprecated.
Will be removed. Use loadObjectAttributeBean(objectId, objectTypeAttributeId) instead
|
ObjectAttributeBean |
loadObjectAttributeBean(int objectId,
int objectTypeAttributeId)
Loads a
ObjectAttributeBean given an object id and object type attribute id |
ObjectAttributeBean |
loadObjectAttributeBean(int objectId,
int objectTypeAttributeId,
boolean ignorePermissionCheck)
Loads a
ObjectAttributeBean given an object id, object type attribute id and a parameter to ignore permission check |
ObjectAttributeBean |
loadObjectAttributeBean(int objectId,
String objectTypeAttributeName)
Loads a
ObjectAttributeBean given an object id and object type attribute name |
ObjectBean |
loadObjectBean(int id)
Loads a
ObjectBean given its id. |
ObjectBean |
loadObjectBean(String key)
Loads a
ObjectBean given its key. |
WatcherBean |
loadWatcherBean(int objectId,
String userKey)
Loads a
WatcherBean |
Progress |
moveObjects(MoveObjectBean moveObjectBean)
Move objects to another object type
|
void |
restoreObjectBean(int id)
Restore an
ObjectBean by ID. |
void |
restoreObjectBean(int id,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Restore an
ObjectBean by ID with control over the event dispatch option. |
void |
restoreObjectBean(String objectKey)
Restore an
ObjectBean by object key. |
void |
restoreObjectBean(String objectKey,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Restore an
ObjectBean by object key with control over the event dispatch option. |
CommentBean |
storeCommentBean(CommentBean commentBean)
Store a
CommentBean |
ObjectAttributeBean |
storeObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean)
Stores a
ObjectAttributeBean |
ObjectAttributeBean |
storeObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Stores a
ObjectAttributeBean |
ObjectAttributeBean |
storeObjectAttributeBean(ObjectAttributeBean objectAttributeBean) |
ObjectBean |
storeObjectBean(MutableObjectBean objectBean)
Stores a
ObjectBean |
ObjectBean |
storeObjectBean(MutableObjectBean objectBean,
byte[] avatarData,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Stores a
ObjectBean with the corresponding avatar |
ObjectBean |
storeObjectBean(MutableObjectBean objectBean,
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
Stores a
ObjectBean |
ObjectBean |
storeObjectBeanIgnoreAttributeValidation(MutableObjectBean objectBean)
Stores a
ObjectBean bypassing ALL attribute validation e.g. |
void |
validateObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean,
ObjectBean objectBean)
Validate an object attribute bean.
|
void |
validateObjectBean(MutableObjectBean objectBean)
Validate an object bean.
|
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)
public ObjectBean storeObjectBean(MutableObjectBean objectBean, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException
ObjectFacadeObjectBeanstoreObjectBean in interface ObjectFacadeobjectBean - the object bean to storeeventDispatchOption - event dispatchObjectBeanInsightException - if something goes wrongpublic ObjectBean storeObjectBean(@Nonnull MutableObjectBean objectBean, @Nonnull byte[] avatarData, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException
ObjectFacadeObjectBean with the corresponding avatarstoreObjectBean in interface ObjectFacadeobjectBean - 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 dispatchObjectBeanInsightException - if something goespublic ObjectBean storeObjectBean(MutableObjectBean objectBean) throws InsightException
ObjectFacadeObjectBeanstoreObjectBean in interface ObjectFacadeobjectBean - the object bean to storeObjectBeanInsightException - if something goes wrongpublic ObjectBean storeObjectBeanIgnoreAttributeValidation(MutableObjectBean objectBean) throws InsightException
ObjectFacadeObjectBean bypassing 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.storeObjectBeanIgnoreAttributeValidation in interface ObjectFacadeobjectBean - the object bean with corresponding attributes. Attributes present will NOT be validatedInsightExceptionpublic ObjectAttributeBean storeObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean) throws InsightException
ObjectFacadeObjectAttributeBeanstoreObjectAttributeBean in interface ObjectFacadeObjectAttributeBeanInsightException - if something goes wrongpublic ObjectAttributeBean storeObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException
ObjectFacadeObjectAttributeBeanstoreObjectAttributeBean in interface ObjectFacadeObjectAttributeBeanInsightException - if something goes wrongpublic ObjectAttributeBean storeObjectAttributeBean(ObjectAttributeBean objectAttributeBean) throws InsightException
storeObjectAttributeBean in interface ObjectFacadeInsightExceptionpublic int countObjectBeans(int objectTypeId)
throws InsightException
ObjectFacadeObjectBean domain objects.countObjectBeans in interface ObjectFacadeInsightExceptionpublic ObjectBean loadObjectBean(int id) throws InsightException
ObjectFacadeObjectBean given its id.loadObjectBean in interface ObjectFacadeObjectBeanInsightExceptionpublic ObjectBean loadObjectBean(String key) throws InsightException
ObjectFacadeObjectBean given its key.loadObjectBean in interface ObjectFacadeObjectBeanInsightExceptionpublic void deleteObjectBean(int id,
@Nonnull
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
throws InsightException
ObjectFacadeObjectBeandeleteObjectBean in interface ObjectFacadeInsightExceptionpublic void deleteObjectBean(int id)
throws InsightException
ObjectFacadeObjectBeandeleteObjectBean in interface ObjectFacadeInsightExceptionpublic void archiveObjectBean(int id)
throws InsightException
ObjectFacadeObjectBean by ID.archiveObjectBean in interface ObjectFacadeid - the id of the object to archiveInsightExceptionpublic void archiveObjectBean(int id,
@NotNull
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
throws InsightException
ObjectFacadeObjectBean by ID with control over the event dispatch option.archiveObjectBean in interface ObjectFacadeid - the id of the object to archiveeventDispatchOption - event dispatch optionInsightExceptionpublic void archiveObjectBean(String objectKey) throws InsightException
ObjectFacadeObjectBean by object key.archiveObjectBean in interface ObjectFacadeobjectKey - the key of the object to archiveInsightExceptionpublic void archiveObjectBean(String objectKey, @NotNull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException
ObjectFacadeObjectBean by object key with control over the event dispatch option.archiveObjectBean in interface ObjectFacadeobjectKey - the key of the object to archiveeventDispatchOption - event dispatch optionInsightExceptionpublic void restoreObjectBean(int id)
throws InsightException
ObjectFacadeObjectBean by ID.restoreObjectBean in interface ObjectFacadeid - the id of the object to restoreInsightExceptionpublic void restoreObjectBean(int id,
@NotNull
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
throws InsightException
ObjectFacadeObjectBean by ID with control over the event dispatch option.restoreObjectBean in interface ObjectFacadeid - the id of the object to restoreeventDispatchOption - event dispatch optionInsightExceptionpublic void restoreObjectBean(String objectKey) throws InsightException
ObjectFacadeObjectBean by object key.restoreObjectBean in interface ObjectFacadeobjectKey - the key of the object to restoreInsightExceptionpublic void restoreObjectBean(String objectKey, @NotNull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException
ObjectFacadeObjectBean by object key with control over the event dispatch option.restoreObjectBean in interface ObjectFacadeobjectKey - the key of the object to restoreeventDispatchOption - event dispatch optionInsightExceptionpublic List<ObjectAttributeBean> findObjectAttributeBeans(int objectId) throws InsightException
ObjectFacadeObjectAttributeBeanfindObjectAttributeBeans in interface ObjectFacadeobjectId - the ObjectBean idObjectAttributeBeanInsightException@Deprecated public ObjectAttributeBean loadObjectAttributeBean(int id) throws InsightException
ObjectFacadeObjectAttributeBean given its id.loadObjectAttributeBean in interface ObjectFacadeObjectAttributeBeanInsightExceptionpublic ObjectAttributeBean loadObjectAttributeBean(int objectId, int objectTypeAttributeId) throws InsightException
ObjectFacadeObjectAttributeBean given an object id and object type attribute idloadObjectAttributeBean in interface ObjectFacadeObjectAttributeBeanInsightExceptionpublic ObjectAttributeBean loadObjectAttributeBean(int objectId, int objectTypeAttributeId, boolean ignorePermissionCheck) throws InsightException
ObjectFacadeObjectAttributeBean given an object id, object type attribute id and a parameter to ignore permission checkloadObjectAttributeBean in interface ObjectFacadeObjectAttributeBeanInsightExceptionpublic ObjectAttributeBean loadObjectAttributeBean(int objectId, String objectTypeAttributeName) throws InsightException
ObjectFacadeObjectAttributeBean given an object id and object type attribute nameloadObjectAttributeBean in interface ObjectFacadeObjectAttributeBeanInsightException@Deprecated public void deleteObjectAttributeBean(int id) throws InsightException
ObjectFacadedeleteObjectAttributeBean in interface ObjectFacadeInsightException@Deprecated public void deleteObjectAttributeBean(int id, @Nonnull com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption) throws InsightException
ObjectFacadedeleteObjectAttributeBean in interface ObjectFacadeInsightExceptionpublic void deleteObjectAttributeBean(long id,
@Nonnull
com.riadalabs.jira.plugins.insight.services.events.EventDispatchOption eventDispatchOption)
throws InsightException
ObjectFacadedeleteObjectAttributeBean in interface ObjectFacadeInsightExceptionpublic void deleteObjectAttributeBean(long id)
throws InsightException
ObjectFacadedeleteObjectAttributeBean in interface ObjectFacadeInsightExceptionpublic List<ObjectHistoryBean> findObjectHistoryBean(int objectId) throws InsightException
ObjectFacadeObjectBean historyfindObjectHistoryBean in interface ObjectFacadeObjectHistoryBeanInsightExceptionpublic AttachmentBean loadAttachmentBeanById(int id) throws InsightException
ObjectFacadeAttachmentBeanloadAttachmentBeanById in interface ObjectFacadeAttachmentBeanInsightExceptionpublic AttachmentBean addAttachmentBean(int objectId, File file, String fileName, String contentType, String comment) throws InsightException
ObjectFacadeAttachmentBean domain objects.addAttachmentBean in interface ObjectFacadeobjectId - the ObjectBean idfile - the file to addfileName - the filenamecontentType - the content typecomment - an optional commentAttachmentBeanInsightExceptionpublic List<AttachmentBean> findAttachmentBeans(int objectId) throws InsightException
ObjectFacadeObjectBean idfindAttachmentBeans in interface ObjectFacadeobjectId - the ObjectBean idAttachmentBeanInsightExceptionpublic AttachmentBean deleteAttachmentBean(int attachmentId) throws InsightException
ObjectFacadeAttachmentBeandeleteAttachmentBean in interface ObjectFacadeAttachmentBeanInsightExceptionpublic List<ObjectTicketConnectionEntry> findObjectTicketConnections(int objectId) throws InsightException
ObjectFacadeObjectBeanfindObjectTicketConnections in interface ObjectFacadeObjectTicketConnectionEntryInsightExceptionpublic List<ObjectTicketConnectionEntry> findObjectTicketConnections(int objectId, int offset, int limit) throws InsightException
findObjectTicketConnections in interface ObjectFacadeInsightExceptionpublic List<ObjectTicketConnectionEntry> findObjectTicketConnections(long ticketId) throws InsightException
ObjectFacadefindObjectTicketConnections in interface ObjectFacadeObjectTicketConnectionEntryInsightExceptionpublic void deleteCommentBean(int commentBeanId)
throws InsightException
ObjectFacadeCommentBeandeleteCommentBean in interface ObjectFacadeInsightExceptionpublic CommentBean storeCommentBean(CommentBean commentBean) throws InsightException
ObjectFacadeCommentBeanstoreCommentBean in interface ObjectFacadeCommentBeanInsightExceptionpublic List<CommentBean> findCommentBeans(int objectId) throws InsightException
ObjectFacadeCommentBean for an ObjectBeanfindCommentBeans in interface ObjectFacadeCommentBeanInsightExceptionpublic CommentBean loadCommentBean(int commentId) throws InsightException
ObjectFacadeCommentBeanloadCommentBean in interface ObjectFacadeCommentBeanInsightExceptionpublic WatcherBean loadWatcherBean(int objectId, String userKey) throws InsightException
ObjectFacadeWatcherBeanloadWatcherBean in interface ObjectFacadeobjectId - the ObjectBean iduserKey - the User keyWatcherBeanInsightExceptionpublic List<WatcherBean> findWatcherBeans(int objectId) throws InsightException
ObjectFacadeWatcherBean for an ObjectBeanfindWatcherBeans in interface ObjectFacadeWatcherBeanInsightExceptionpublic WatcherBean createWatcherBean(int objectId, String userKey) throws InsightException
ObjectFacadeWatcherBeancreateWatcherBean in interface ObjectFacadeobjectId - the ObjectBean iduserKey - the userkeyWatcherBeanInsightExceptionpublic void deleteWatcherBean(WatcherBean watcherBean) throws InsightException
ObjectFacadeWatcherBeandeleteWatcherBean in interface ObjectFacadeInsightExceptionpublic Progress moveObjects(MoveObjectBean moveObjectBean) throws Exception
ObjectFacademoveObjects in interface ObjectFacadeProgressExceptionpublic void validateObjectBean(MutableObjectBean objectBean) throws ValidationInsightException, IQLValidationException
ObjectFacadevalidateObjectBean in interface ObjectFacadeValidationInsightExceptionIQLValidationExceptionpublic void validateObjectAttributeBean(MutableObjectAttributeBean objectAttributeBean, ObjectBean objectBean) throws ValidationInsightException, IQLValidationException
ObjectFacadevalidateObjectAttributeBean in interface ObjectFacadeValidationInsightExceptionIQLValidationExceptionCopyright © 2024 Atlassian. All rights reserved.