public class CodeListServiceImpl extends Object implements CodeListService
Modifier and Type | Field and Description |
---|---|
protected CodeListAssociations |
associations
The code list association configuration.
|
protected ComplexConfigurationService |
complexConfigService
The configuration service to use for storing/loading assignments.
|
protected de.fhg.igd.osgi.util.configuration.IConfigurationService |
configurationService
The configuration service to use for storing/loading assignments.
|
protected ProjectService |
projectService
The associated project service.
|
Constructor and Description |
---|
CodeListServiceImpl(ProjectService projectService)
Constructs this code list service with the given project service.
|
Modifier and Type | Method and Description |
---|---|
void |
addCodeList(String resourceId,
CodeList code)
Add a code list to the service.
|
void |
assignEntityCodeList(EntityDefinition entity,
CodeList code)
Assign a code list for a property entity definition.
|
CodeList |
findCodeListByAttribute(String attributeIdentifier)
Find a code list by attribute identifier.
|
CodeList |
findCodeListByEntity(EntityDefinition entity)
Tries to find a code list associated to the property referenced by the
given entity definition.
|
CodeList |
findCodeListByIdentifier(String namespace,
String identifier)
Tries to find the code list with the given namespace and identifier.
|
CodeList |
getCodeList(String resourceId)
Get the code list associated to a specific resource.
|
List<CodeList> |
getCodeLists()
Get the code lists.
|
boolean |
removeCodeList(String resourceId)
Remove the code list associated to a specific resource.
|
protected final ProjectService projectService
protected final de.fhg.igd.osgi.util.configuration.IConfigurationService configurationService
protected final ComplexConfigurationService complexConfigService
protected volatile CodeListAssociations associations
public CodeListServiceImpl(ProjectService projectService)
projectService
- the project servicepublic CodeList findCodeListByIdentifier(String namespace, String identifier)
CodeListService
findCodeListByIdentifier
in interface CodeListService
namespace
- the namespaceidentifier
- the identifiernull
CodeListService.findCodeListByIdentifier(String, String)
public List<CodeList> getCodeLists()
CodeListService
getCodeLists
in interface CodeListService
CodeListService.getCodeLists()
public CodeList findCodeListByEntity(EntityDefinition entity)
CodeListService
findCodeListByEntity
in interface CodeListService
entity
- the entity definitionnull
public void assignEntityCodeList(EntityDefinition entity, CodeList code)
CodeListService
assignEntityCodeList
in interface CodeListService
entity
- the entity definitioncode
- the code list to assign or null
if the
assignment shall be deletedpublic CodeList findCodeListByAttribute(String attributeIdentifier)
attributeIdentifier
- the attribute identifiernull
public void addCodeList(String resourceId, CodeList code)
CodeListService
addCodeList
in interface CodeListService
resourceId
- the resource identifier of the code listcode
- the code list to addpublic CodeList getCodeList(String resourceId)
CodeListService
getCodeList
in interface CodeListService
resourceId
- the resource identifiernull
if no code list associated to
the resource ID could be foundpublic boolean removeCodeList(String resourceId)
CodeListService
removeCodeList
in interface CodeListService
resourceId
- the resource identifiertrue
if the code list associated to the resource was
present and successfully removed, false
otherwiseBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a