@PublicApi public class ObjectAttributeBeanFactoryImpl extends Object implements ObjectAttributeBeanFactory
ObjectAttributeBean.| Constructor and Description |
|---|
ObjectAttributeBeanFactoryImpl(io.riada.insight.utils.PropertyManager propertyManager,
io.riada.insight.services.InsightUserService insightUserService,
com.riadalabs.jira.plugins.insight.services.core.ConfigureService configureService,
com.riadalabs.jira.plugins.insight.services.core.ObjectFilterManager objectFilterManager,
com.riadalabs.jira.plugins.insight.services.predicate.ObjectBeanPredicateFactory objectBeanPredicateFactory,
com.riadalabs.jira.plugins.insight.services.core.ObjectTypeService objectTypeService,
io.riada.insight.external.services.UserGroupService userGroupService,
io.riada.insight.external.services.ProjectService projectService,
io.riada.insight.external.services.VersionService versionService) |
| Modifier and Type | Method and Description |
|---|---|
MutableObjectAttributeBean |
createConfluenceAttributeValue(ObjectTypeAttributeBean ota,
Long... pageIds) |
MutableObjectAttributeBean |
createDefaultTypeValues(ObjectTypeAttributeBean ota,
Object... values)
Creates default type values from the specified values.
|
MutableObjectAttributeBean |
createGroupAttributeValue(ObjectTypeAttributeBean ota,
Predicate<InsightGroup> groupPredicate)
Create an object attribute bean with all groups matching the predicate
|
MutableObjectAttributeBean |
createGroupAttributeValueByNames(ObjectTypeAttributeBean ota,
String... groupNames)
Create an object attribute bean with one or more group names
|
MutableObjectAttributeBean |
createObjectAttributeBean(ObjectTypeAttributeBean ota,
DateFormat dateFormat,
DateFormat dateTimeFormat,
String... values)
Creates an object attribute bean of the type specified by the object type supplied.
|
MutableObjectAttributeBean |
createObjectAttributeBean(ObjectTypeAttributeBean ota,
String... values)
Creates an object attribute bean by using the jira default date format as well as the jira date time format if
the object type attribute supplied is of date or date time format respectively.
|
MutableObjectAttributeBean |
createObjectAttributeBeanForObject(ObjectBean objectBean,
ObjectTypeAttributeBean ota,
DateFormat dateFormat,
DateFormat dateTimeFormat,
String... values)
Creates an object attribute bean with the specified date format and date time format for the supplied object
bean.
|
MutableObjectAttributeBean |
createObjectAttributeBeanForObject(ObjectBean objectBean,
ObjectTypeAttributeBean ota,
String... values)
Creates an object attribute bean of the given
ObjectTypeAttributeBean type and with the supplied values. |
MutableObjectAttributeBean |
createProjectAttributeValue(ObjectTypeAttributeBean ota,
Predicate<InsightProject> predicate) |
MutableObjectAttributeBean |
createReferenceAttributeValue(ObjectTypeAttributeBean ota,
Predicate<ObjectBean> predicate) |
MutableObjectAttributeBean |
createStatusAttributeValue(ObjectTypeAttributeBean ota,
Predicate<StatusTypeBean> predicate) |
MutableObjectAttributeBean |
createUserAttributeValueByKey(ObjectTypeAttributeBean ota,
String... userKeys)
Create a user attribute by supplying one or more user keys convenient method when you have one or more user keys.
|
MutableObjectAttributeBean |
createUserAttributeValueByName(ObjectTypeAttributeBean ota,
String... userNames)
Create a user attribute by one or more user names
|
MutableObjectAttributeBean |
createUserTypeAttribute(ObjectTypeAttributeBean ota,
List<String> valueList,
boolean includeInactiveUsers,
Integer maxUserSearchValue)
Creates an ObjectAttributeBean with values with all users matching the given userPredicate.
|
MutableObjectAttributeBean |
createUserTypeAttribute(ObjectTypeAttributeBean ota,
String userKey)
Creates an ObjectAttributeBean with values with user matching the given user key
|
MutableObjectAttributeBean |
createUserTypeAttributeByKeyOrUsername(ObjectTypeAttributeBean ota,
List<String> userKeys)
Creates an ObjectAttributeBean with values with user matching the given user keys
|
MutableObjectAttributeBean |
createVersionAttributeValue(ObjectTypeAttributeBean ota,
Predicate<InsightVersion> predicate) |
public ObjectAttributeBeanFactoryImpl(io.riada.insight.utils.PropertyManager propertyManager,
io.riada.insight.services.InsightUserService insightUserService,
com.riadalabs.jira.plugins.insight.services.core.ConfigureService configureService,
com.riadalabs.jira.plugins.insight.services.core.ObjectFilterManager objectFilterManager,
com.riadalabs.jira.plugins.insight.services.predicate.ObjectBeanPredicateFactory objectBeanPredicateFactory,
com.riadalabs.jira.plugins.insight.services.core.ObjectTypeService objectTypeService,
io.riada.insight.external.services.UserGroupService userGroupService,
io.riada.insight.external.services.ProjectService projectService,
io.riada.insight.external.services.VersionService versionService)
@NotNull public MutableObjectAttributeBean createObjectAttributeBeanForObject(@NotNull ObjectBean objectBean, @NotNull ObjectTypeAttributeBean ota, String... values) throws InsightException
ObjectTypeAttributeBean type and with the supplied values.
The created object attribute is not appended to the supplied object bean. The caller will have to append
the object attribute to the object and persist the same. The method will create all information needed for the
object attribute together with object attribute values. A call to this method is the same as to createObjectAttributeBeanForObject(ObjectBean, ObjectTypeAttributeBean, DateFormat, DateFormat, String...) with
JIRAs default date format and date time formatcreateObjectAttributeBeanForObject in interface ObjectAttributeBeanFactoryobjectBean - the object bean that are supposed to have the object attribute. I.e. the value for object id
will be used from the object beanota - the attribute type to createvalues - a vararg of values.InsightException - if the ota is of object type reference and when trying to find the reference objects
fails in some way.IllegalArgumentException - if no matching type is found for the ObjectTypeAttributeBean or if the values
supplied are nullpublic MutableObjectAttributeBean createObjectAttributeBeanForObject(ObjectBean objectBean, ObjectTypeAttributeBean ota, DateFormat dateFormat, DateFormat dateTimeFormat, String... values) throws InsightException
ObjectTypeAttributeBean is of the type User the values supplied will be used to match users
based on display name, email or user key. This method uses {#createObjectAttributeBean(ObjectTypeAttributeBean, *
DateFormat, DateFormat, String...)} internally but appends the relevant object bean information to the created
object attributecreateObjectAttributeBeanForObject in interface ObjectAttributeBeanFactoryobjectBean - the object bean that are supposed to have the object attribute. I.e. the value for object id
will be used from the object beanota - the attribute type to createdateFormat - a java date format used to parse date values if the ObjectTypeAttributeBean is of a
date typedateTimeFormat - a java date time format used to parse date values if the ObjectTypeAttributeBean is
of a date time typevalues - a vararg of values.InsightException - if the ota is of object type reference and when trying to find the reference objects
fails in some way.IllegalArgumentException - if no matching type is found for the ObjectTypeAttributeBean or if the values
supplied are null@NotNull public MutableObjectAttributeBean createObjectAttributeBean(@NotNull ObjectTypeAttributeBean ota, String... values) throws InsightException
createObjectAttributeBean(ObjectTypeAttributeBean, DateFormat, DateFormat, String...) internally but with JIRA
default dateFormat and dateTimeFormat for the date format parameterscreateObjectAttributeBean in interface ObjectAttributeBeanFactoryota - the attribute type to createvalues - a vararg of valuesInsightException - if the ota is of object type reference and when trying to find the reference objects
fails in some way.IllegalArgumentException - if no matching type is found for the ObjectTypeAttributeBean or if the values
supplied are nullpublic MutableObjectAttributeBean createObjectAttributeBean(ObjectTypeAttributeBean ota, DateFormat dateFormat, DateFormat dateTimeFormat, String... values) throws InsightException
IllegalArgumentException will be throwncreateObjectAttributeBean in interface ObjectAttributeBeanFactoryota - the object type attribute bean that the object attribute created should be ofdateFormat - a date format used to parse date values if the object type attribute is of a date typedateTimeFormat - a date time format used to parse date time values if the object type attribute is of a date
time typevalues - a vararg of string values. See the above description for what is expected for each valueInsightException - if the object type attribute is of a object reference type and Insight fails to load the
object referenced by the supplied valuesIllegalArgumentException - if no matching type is found for the ObjectTypeAttributeBean or if the values
supplied are nullpublic MutableObjectAttributeBean createUserAttributeValueByKey(ObjectTypeAttributeBean ota, String... userKeys)
createObjectAttributeBean(ObjectTypeAttributeBean, List) internallycreateUserAttributeValueByKey in interface ObjectAttributeBeanFactoryota - the object type attribute determining the type that should be created, can not be nulluserKeys - the value(s) that should be used to search jira for users by keypublic MutableObjectAttributeBean createUserAttributeValueByName(ObjectTypeAttributeBean ota, String... userNames)
createUserAttributeValueByName in interface ObjectAttributeBeanFactoryota - the object type attribute determining the type that should be created, can not be nulluserNames - the user names that should be used to query user service for usersMutableObjectAttributeValueBean(s)public MutableObjectAttributeBean createUserTypeAttribute(ObjectTypeAttributeBean ota, List<String> valueList, boolean includeInactiveUsers, Integer maxUserSearchValue)
createUserTypeAttribute in interface ObjectAttributeBeanFactoryota - the object type attribute bean. The maximum cardinality will be used from this parameter and only find
that many users. If multiple users match the predicate only the maximum cardinality will be included. This may
not be deterministicvalueList - the list of users that should be includedincludeInactiveUsers - if inactive users should be included or not.MutableObjectAttributeValueBean(s)public MutableObjectAttributeBean createUserTypeAttribute(ObjectTypeAttributeBean ota, String userKey)
createUserTypeAttribute in interface ObjectAttributeBeanFactoryota - the object type attribute bean. The maximum cardinality will be used from this parameter and only find
that many users. If multiple users match the predicate only the maximum cardinality will be included. This may
not be deterministicuserKey - the user keyMutableObjectAttributeValueBean(s)public MutableObjectAttributeBean createUserTypeAttributeByKeyOrUsername(ObjectTypeAttributeBean ota, List<String> userKeys)
createUserTypeAttributeByKeyOrUsername in interface ObjectAttributeBeanFactoryota - the object type attribute bean. The maximum cardinality will be used from this parameter and only find
that many users. If multiple users match the predicate only the maximum cardinality will be included. This may
not be deterministicuserKeys - the list of user keysMutableObjectAttributeValueBean(s)public MutableObjectAttributeBean createGroupAttributeValueByNames(ObjectTypeAttributeBean ota, String... groupNames)
createGroupAttributeValueByNames in interface ObjectAttributeBeanFactoryota - the object type attribute determining the type that should be created, can not be nullgroupNames - used to query the JIRA for groups matching the given name(s)MutableObjectAttributeValueBean(s)public MutableObjectAttributeBean createGroupAttributeValue(ObjectTypeAttributeBean ota, Predicate<InsightGroup> groupPredicate)
createGroupAttributeValue in interface ObjectAttributeBeanFactoryota - the object type attribute determining the type that should be created, can not be nullgroupPredicate - a predicate that is used to determine which groups that should be matched when creating the
group attributesMutableObjectAttributeValueBean(s)public MutableObjectAttributeBean createProjectAttributeValue(ObjectTypeAttributeBean ota, Predicate<InsightProject> predicate)
createProjectAttributeValue in interface ObjectAttributeBeanFactorypublic MutableObjectAttributeBean createConfluenceAttributeValue(ObjectTypeAttributeBean ota, Long... pageIds)
createConfluenceAttributeValue in interface ObjectAttributeBeanFactorypublic MutableObjectAttributeBean createVersionAttributeValue(ObjectTypeAttributeBean ota, Predicate<InsightVersion> predicate)
createVersionAttributeValue in interface ObjectAttributeBeanFactorypublic MutableObjectAttributeBean createStatusAttributeValue(ObjectTypeAttributeBean ota, Predicate<StatusTypeBean> predicate) throws InsightException
createStatusAttributeValue in interface ObjectAttributeBeanFactoryInsightExceptionpublic MutableObjectAttributeBean createReferenceAttributeValue(ObjectTypeAttributeBean ota, Predicate<ObjectBean> predicate) throws InsightException
createReferenceAttributeValue in interface ObjectAttributeBeanFactoryInsightExceptionpublic MutableObjectAttributeBean createDefaultTypeValues(ObjectTypeAttributeBean ota, Object... values)
createDefaultTypeValues in interface ObjectAttributeBeanFactoryota - the object type attribute determining the type that should be created, can not be nullvalues - the values that should be added as the attributesCopyright © 2024 Atlassian. All rights reserved.