Class FieldLayoutSchemeImpl
java.lang.Object
com.atlassian.jira.issue.fields.screen.AbstractGVBean
com.atlassian.jira.issue.fields.layout.field.FieldLayoutSchemeImpl
- All Implemented Interfaces:
FieldLayoutScheme
,Named
,NamedWithDescription
,NamedWithId
Thread safety is mostly achieved (there are still some issues with the
AbstractGVBean.setGenericValue(GenericValue)
method)
by two mechanisms.
- all mutative operations to the map are done under a write-lock. For extra safety all stores/loads from the database are also done under the lock, even though this is not ideal.
- iteration over the map are protected by a read-lock.
-
Field Summary
Fields inherited from interface com.atlassian.jira.util.Named
NAME_COMPARATOR
-
Constructor Summary
ConstructorsConstructorDescriptionFieldLayoutSchemeImpl
(FieldLayoutManager fieldLayoutManager, org.ofbiz.core.entity.GenericValue genericValue) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEntity
(FieldLayoutSchemeEntity fieldLayoutSchemeEntity) protected void
cacheEntity
(FieldLayoutSchemeEntity fieldLayoutSchemeEntity) boolean
containsEntity
(String issueTypeId) protected void
flushEntity
(FieldLayoutSchemeEntity fieldLayoutSchemeEntity) getEntity
(EditableFieldLayout editableFieldLayout) getFieldLayoutId
(String issueTypeId) Returns the id of the field layout to use for this given issue type id.getId()
getName()
Collection<org.ofbiz.core.entity.GenericValue>
protected void
init()
void
remove()
void
removeEntity
(String issueTypeId) void
setDescription
(String description) void
void
store()
Methods inherited from class com.atlassian.jira.issue.fields.screen.AbstractGVBean
getGenericValue, isModified, setGenericValue, setModified, updateGV
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.jira.issue.fields.layout.field.FieldLayoutScheme
getGenericValue, setGenericValue
-
Constructor Details
-
FieldLayoutSchemeImpl
public FieldLayoutSchemeImpl(FieldLayoutManager fieldLayoutManager, org.ofbiz.core.entity.GenericValue genericValue)
-
-
Method Details
-
init
protected void init()- Specified by:
init
in classAbstractGVBean
-
getId
- Specified by:
getId
in interfaceFieldLayoutScheme
- Specified by:
getId
in interfaceNamedWithId
-
getName
- Specified by:
getName
in interfaceFieldLayoutScheme
- Specified by:
getName
in interfaceNamed
-
setName
- Specified by:
setName
in interfaceFieldLayoutScheme
-
getDescription
- Specified by:
getDescription
in interfaceFieldLayoutScheme
- Specified by:
getDescription
in interfaceNamedWithDescription
-
setDescription
- Specified by:
setDescription
in interfaceFieldLayoutScheme
-
store
public void store()- Specified by:
store
in interfaceFieldLayoutScheme
-
getFieldLayoutId
Description copied from interface:FieldLayoutScheme
Returns the id of the field layout to use for this given issue type id. This will do all the necessary work to lookup the default entry if no specific mapping for the given isuse type id exists. So after calling this method simply use the returned field layout id.- Specified by:
getFieldLayoutId
in interfaceFieldLayoutScheme
- Parameters:
issueTypeId
- the Issue Type ID.- Returns:
- the id of the
FieldLayout
("Field Configuration") to use for this given issue type id.
-
getEntity
- Specified by:
getEntity
in interfaceFieldLayoutScheme
-
getEntity
- Specified by:
getEntity
in interfaceFieldLayoutScheme
-
getProjects
- Specified by:
getProjects
in interfaceFieldLayoutScheme
-
getProjectsUsing
- Specified by:
getProjectsUsing
in interfaceFieldLayoutScheme
-
containsEntity
- Specified by:
containsEntity
in interfaceFieldLayoutScheme
-
addEntity
- Specified by:
addEntity
in interfaceFieldLayoutScheme
-
removeEntity
- Specified by:
removeEntity
in interfaceFieldLayoutScheme
-
getEntities
- Specified by:
getEntities
in interfaceFieldLayoutScheme
-
remove
public void remove()- Specified by:
remove
in interfaceFieldLayoutScheme
-
cacheEntity
-
flushEntity
-