|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CustomFieldService
Service for encapsulating custom field logic, especially the rather complex JIRA logic behind creating and working with these things.
Field Summary | |
---|---|
static java.lang.String |
SERVICE
|
Method Summary | ||
---|---|---|
void |
associateCustomFieldContext(com.atlassian.jira.issue.fields.CustomField customField,
CustomFieldMetadata customFieldMetadata)
Re-associates the custom field to the specified contexts. |
|
void |
associateWithDefaultScreen(com.atlassian.jira.issue.fields.CustomField customField)
Associate the custom field with the "Default Screen". |
|
com.atlassian.jira.issue.fields.CustomField |
createCustomField(CustomFieldMetadata fieldMetadata)
Create a new custom field in JIRA with the given configuration |
|
com.atlassian.jira.issue.fields.CustomField |
getCustomField(java.lang.Long id)
|
|
com.atlassian.jira.issue.fields.CustomField |
getCustomField(java.lang.String id)
|
|
|
getCustomFields(java.lang.Class<T> type)
Return all custom field instances which are of type T (but not sub-classes). |
|
|
getCustomFields(java.lang.Class<T> type,
boolean strict)
Return all custom field instances which are of type T , or a subclass of T . |
|
boolean |
isFieldApplicable(com.atlassian.jira.issue.fields.CustomField customField,
com.atlassian.jira.issue.Issue issue)
Determine whether the given custom field is applicable for (i.e. |
|
boolean |
isFieldApplicable(com.atlassian.jira.issue.fields.CustomField customField,
java.lang.Long projectId,
java.lang.String issueTypeId)
Determine whether the given custom field is applicable for (i.e. |
|
boolean |
isFieldVisible(com.atlassian.jira.issue.fields.CustomField customField,
com.atlassian.jira.issue.Issue issue)
|
|
boolean |
isSystemFieldName(java.lang.String fieldName)
Check whether the passed field name matches a system field name (as used by JQL) |
|
boolean |
isUniqueFieldName(com.atlassian.jira.issue.fields.CustomField customField)
Has the custom field a unique name? Used whenever creating JQL to decide whether to use the name or the id of the field |
|
void |
makeFieldRequired(com.atlassian.jira.issue.fields.CustomField field)
Make the specified field required for all configurations |
|
void |
removeCustomField(com.atlassian.jira.issue.fields.CustomField customField)
Removes the custom field and all associated data. |
|
void |
setOptionsOrderFromMetadata(com.atlassian.jira.issue.fields.CustomField customField,
CustomFieldMetadata fieldMetadata)
Set the order of Options in a CustomField based on the order of the Options in the CustomFieldMetadata. |
Field Detail |
---|
static final java.lang.String SERVICE
Method Detail |
---|
com.atlassian.jira.issue.fields.CustomField createCustomField(CustomFieldMetadata fieldMetadata)
void associateCustomFieldContext(com.atlassian.jira.issue.fields.CustomField customField, CustomFieldMetadata customFieldMetadata)
customField
- the field instancecustomFieldMetadata
- the metadata which contains context and issue type informationcom.atlassian.jira.issue.fields.CustomField getCustomField(java.lang.Long id)
CustomField
instance for the given ID, or null if it doesn't existcom.atlassian.jira.issue.fields.CustomField getCustomField(java.lang.String id)
CustomField
instance for the given String ID, or null if it doesn't exist<T extends com.atlassian.jira.issue.customfields.CustomFieldType> java.util.List<com.atlassian.jira.issue.fields.CustomField> getCustomFields(java.lang.Class<T> type)
T
(but not sub-classes).
T
- the CustomFieldType to check for. Equality checking is done on the custom field's type.type
- the type to retrieve
<T extends com.atlassian.jira.issue.customfields.CustomFieldType> java.util.List<com.atlassian.jira.issue.fields.CustomField> getCustomFields(java.lang.Class<T> type, boolean strict)
T
, or a subclass of T
.
T
- the CustomFieldType to check for. Equality checking is done on the custom field's type.type
- the type to retrievestrict
- set to true
to do a strict equality check on the specified type.
void associateWithDefaultScreen(com.atlassian.jira.issue.fields.CustomField customField)
void removeCustomField(com.atlassian.jira.issue.fields.CustomField customField)
customField
- the custom field objectCustomFieldManager.removeCustomField(com.atlassian.jira.issue.fields.CustomField)
boolean isUniqueFieldName(com.atlassian.jira.issue.fields.CustomField customField)
boolean isSystemFieldName(java.lang.String fieldName)
boolean isFieldApplicable(com.atlassian.jira.issue.fields.CustomField customField, com.atlassian.jira.issue.Issue issue)
customField
- the fieldissue
- the issue
boolean isFieldApplicable(com.atlassian.jira.issue.fields.CustomField customField, java.lang.Long projectId, java.lang.String issueTypeId)
customField
- the fieldprojectId
- the project the issue is inissueTypeId
- the issue type of the issue
boolean isFieldVisible(com.atlassian.jira.issue.fields.CustomField customField, com.atlassian.jira.issue.Issue issue)
void makeFieldRequired(com.atlassian.jira.issue.fields.CustomField field)
field
- the custom field.void setOptionsOrderFromMetadata(com.atlassian.jira.issue.fields.CustomField customField, CustomFieldMetadata fieldMetadata)
customField
- fieldMetadata
-
CustomFieldException
- If the Options in the CustomField do not match the Options in the CustomFieldMetadata. This only re-orders if they have the same options.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |