@PublicApi
public interface ObjectAttributeBeanFactory
ObjectAttributeBean.| 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) |
@Nonnull MutableObjectAttributeBean createObjectAttributeBeanForObject(@Nonnull ObjectBean objectBean, @Nonnull 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 formatobjectBean - 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 nullMutableObjectAttributeBean 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 usesobjectBean - 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@Nonnull MutableObjectAttributeBean createObjectAttributeBean(@Nonnull ObjectTypeAttributeBean ota, String... values) throws InsightException
createObjectAttributeBean(ObjectTypeAttributeBean, DateFormat, DateFormat, String...) internally but with JIRA
default dateFormat and dateTimeFormat for the date format parametersota - 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 nullMutableObjectAttributeBean createObjectAttributeBean(ObjectTypeAttributeBean ota, DateFormat dateFormat, DateFormat dateTimeFormat, String... values) throws InsightException
IllegalArgumentException will be thrownota - 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 nullMutableObjectAttributeBean createUserAttributeValueByKey(ObjectTypeAttributeBean ota, String... userKeys)
ota - 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 keyMutableObjectAttributeBean createUserAttributeValueByName(ObjectTypeAttributeBean ota, String... userNames)
ota - 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)MutableObjectAttributeBean createUserTypeAttribute(ObjectTypeAttributeBean ota, List<String> valueList, boolean includeInactiveUsers, Integer maxUserSearchValue)
ota - 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 predicate to match if a user should be included as a valueincludeInactiveUsers - if inactive users should be included or not.MutableObjectAttributeValueBean(s)MutableObjectAttributeBean createUserTypeAttribute(ObjectTypeAttributeBean ota, String userKey)
ota - 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)MutableObjectAttributeBean createUserTypeAttributeByKeyOrUsername(ObjectTypeAttributeBean ota, List<String> userKeys)
ota - 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)MutableObjectAttributeBean createGroupAttributeValueByNames(ObjectTypeAttributeBean ota, String... groupNames)
ota - 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)MutableObjectAttributeBean createGroupAttributeValue(ObjectTypeAttributeBean ota, Predicate<InsightGroup> groupPredicate)
ota - 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)MutableObjectAttributeBean createProjectAttributeValue(ObjectTypeAttributeBean ota, Predicate<InsightProject> predicate)
MutableObjectAttributeBean createConfluenceAttributeValue(ObjectTypeAttributeBean ota, Long... pageIds)
MutableObjectAttributeBean createVersionAttributeValue(ObjectTypeAttributeBean ota, Predicate<InsightVersion> predicate)
MutableObjectAttributeBean createStatusAttributeValue(ObjectTypeAttributeBean ota, Predicate<StatusTypeBean> predicate) throws InsightException
InsightExceptionMutableObjectAttributeBean createReferenceAttributeValue(ObjectTypeAttributeBean ota, Predicate<ObjectBean> predicate) throws InsightException
InsightExceptionMutableObjectAttributeBean createDefaultTypeValues(ObjectTypeAttributeBean ota, Object... values)
ota - 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.