|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.greenhopper.customfield.CustomFieldServiceImpl
@Service(value="gh-customFieldService") public class CustomFieldServiceImpl
Field Summary | |
---|---|
protected LoggerWrapper |
log
|
Fields inherited from interface com.atlassian.greenhopper.customfield.CustomFieldService |
---|
SERVICE |
Constructor Summary | |
---|---|
CustomFieldServiceImpl()
|
Method Summary | ||
---|---|---|
com.atlassian.jira.issue.fields.config.FieldConfigScheme |
associateCustomFieldContext(com.atlassian.jira.issue.fields.CustomField customField,
CustomFieldMetadata customFieldMetadata)
Re-associates the custom field to the specified contexts. |
|
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. |
|
boolean |
verifyCustomFieldExistsInDB(java.lang.Long customFieldId)
Checks if a custom field with the given id exists in the database |
|
boolean |
verifyCustomFieldExistsInDB(java.lang.String customFieldId)
Checks if a custom field with the given id exists in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final LoggerWrapper log
Constructor Detail |
---|
public CustomFieldServiceImpl()
Method Detail |
---|
public com.atlassian.jira.issue.fields.CustomField createCustomField(CustomFieldMetadata fieldMetadata)
CustomFieldService
createCustomField
in interface CustomFieldService
public com.atlassian.jira.issue.fields.config.FieldConfigScheme associateCustomFieldContext(com.atlassian.jira.issue.fields.CustomField customField, CustomFieldMetadata customFieldMetadata)
CustomFieldService
associateCustomFieldContext
in interface CustomFieldService
customField
- the field instancecustomFieldMetadata
- the metadata which contains context and issue type informationpublic void setOptionsOrderFromMetadata(com.atlassian.jira.issue.fields.CustomField customField, CustomFieldMetadata fieldMetadata)
CustomFieldService
setOptionsOrderFromMetadata
in interface CustomFieldService
public com.atlassian.jira.issue.fields.CustomField getCustomField(java.lang.Long id)
getCustomField
in interface CustomFieldService
CustomField
instance for the given ID, or null if it doesn't existpublic com.atlassian.jira.issue.fields.CustomField getCustomField(java.lang.String id)
getCustomField
in interface CustomFieldService
CustomField
instance for the given String ID, or null if it doesn't existpublic void removeCustomField(com.atlassian.jira.issue.fields.CustomField customField)
CustomFieldService
removeCustomField
in interface CustomFieldService
customField
- the custom field objectCustomFieldManager.removeCustomField(com.atlassian.jira.issue.fields.CustomField)
public <T extends com.atlassian.jira.issue.customfields.CustomFieldType> java.util.List<com.atlassian.jira.issue.fields.CustomField> getCustomFields(java.lang.Class<T> type)
CustomFieldService
T
(but not sub-classes).
getCustomFields
in interface CustomFieldService
T
- the CustomFieldType to check for. Equality checking is done on the custom field's type.type
- the type to retrieve
public <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)
CustomFieldService
T
, or a subclass of T
.
getCustomFields
in interface CustomFieldService
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.
public boolean isUniqueFieldName(com.atlassian.jira.issue.fields.CustomField customField)
CustomFieldService
isUniqueFieldName
in interface CustomFieldService
public boolean isSystemFieldName(java.lang.String fieldName)
isSystemFieldName
in interface CustomFieldService
public boolean isFieldApplicable(com.atlassian.jira.issue.fields.CustomField customField, com.atlassian.jira.issue.Issue issue)
CustomFieldService
isFieldApplicable
in interface CustomFieldService
customField
- the fieldissue
- the issue
public boolean isFieldApplicable(com.atlassian.jira.issue.fields.CustomField customField, java.lang.Long projectId, java.lang.String issueTypeId)
CustomFieldService
isFieldApplicable
in interface CustomFieldService
customField
- the fieldprojectId
- the project the issue is inissueTypeId
- the issue type of the issue
public boolean isFieldVisible(com.atlassian.jira.issue.fields.CustomField customField, com.atlassian.jira.issue.Issue issue)
isFieldVisible
in interface CustomFieldService
public void makeFieldRequired(com.atlassian.jira.issue.fields.CustomField field)
CustomFieldService
makeFieldRequired
in interface CustomFieldService
field
- the custom field.public boolean verifyCustomFieldExistsInDB(java.lang.Long customFieldId)
CustomFieldService
verifyCustomFieldExistsInDB
in interface CustomFieldService
public boolean verifyCustomFieldExistsInDB(java.lang.String customFieldId)
CustomFieldService
verifyCustomFieldExistsInDB
in interface CustomFieldService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |