@Transactional(readOnly=true) public class ComponentServiceImpl extends Object implements ComponentService
ComponentService
.Constructor and Description |
---|
ComponentServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
calculateChecksum(List<Component> components)
Calculates the checksum for the list of components.
|
List<Component> |
getActiveComponentsByNamespaceCode(String namespaceCode)
This will return a list of active
Component with the
given namespaceCode |
List<Component> |
getAllComponentsByNamespaceCode(String namespaceCode)
This will return a list of all
Component with the
given namespaceCode |
Component |
getComponentByCode(String namespaceCode,
String componentCode)
This will return a
Component with the given namespaceCode and
componentCode |
ComponentSetDao |
getComponentSetDao() |
DataObjectService |
getDataObjectService() |
List<Component> |
getDerivedComponentSet(String componentSetId)
This will return a list of derived
Component with the
given componentSetId |
void |
publishDerivedComponents(String componentSetId,
List<Component> components)
Publishes the given set of derived components to make them available to the component system.
|
void |
setComponentSetDao(ComponentSetDao componentSetDao) |
void |
setDataObjectService(DataObjectService dataObjectService) |
protected List<Component> |
translateCollections(QueryResults<ComponentBo> componentBos,
QueryResults<DerivedComponentBo> derivedComponentBos) |
protected void |
updateDerivedComponents(String componentSetId,
List<Component> components) |
protected List<Component> |
validateAndNormalizeComponents(String componentSetId,
List<Component> components) |
public ComponentServiceImpl()
public Component getComponentByCode(String namespaceCode, String componentCode)
ComponentService
Component
with the given namespaceCode and
componentCodegetComponentByCode
in interface ComponentService
namespaceCode
- the namespaceCode of the componentcomponentCode
- the componentCode of the componentpublic List<Component> getAllComponentsByNamespaceCode(String namespaceCode)
ComponentService
Component
with the
given namespaceCodegetAllComponentsByNamespaceCode
in interface ComponentService
namespaceCode
- the namespaceCode of the componentpublic List<Component> getActiveComponentsByNamespaceCode(String namespaceCode)
ComponentService
Component
with the
given namespaceCodegetActiveComponentsByNamespaceCode
in interface ComponentService
namespaceCode
- the namespaceCode of the componentpublic List<Component> getDerivedComponentSet(String componentSetId)
ComponentService
Component
with the
given componentSetIdgetDerivedComponentSet
in interface ComponentService
componentSetId
- the componentSetId of the component@Transactional public void publishDerivedComponents(String componentSetId, List<Component> components)
ComponentService
When invoked, the set of components known to the component system for the given component set id will be replaced with the given list. Any previously published components for the component set id which are not contained within the given list will be deleted.
The componentSetId
should be an identifier generated by the client application which uniquely
identifies the component set being published (either newly published or updated). A simple value to use would
be the applicationId
of the client application but this would mean an application could only ever publish
a single custom component set. So the applicationId
could also be combined with some additional
information on the source of the components being published if a particular application needs to publish custom
components from multiple sources.
The componentSetId
on each of the components supplied in the list must either be null or equal to the
component set id that is passed to this method, otherwise a RiceIllegalArgumentException
will be thrown.
publishDerivedComponents
in interface ComponentService
componentSetId
- an id that uniquely identifies this set of components being checked. The service will use
this to track the components being publishedcomponents
- the components to publish, may be empty or null, in which case all published components for the
given component set id will be deleted from the component system if any existprotected List<Component> validateAndNormalizeComponents(String componentSetId, List<Component> components)
protected String calculateChecksum(List<Component> components)
protected void updateDerivedComponents(String componentSetId, List<Component> components)
protected List<Component> translateCollections(QueryResults<ComponentBo> componentBos, QueryResults<DerivedComponentBo> derivedComponentBos)
public ComponentSetDao getComponentSetDao()
public void setComponentSetDao(ComponentSetDao componentSetDao)
public DataObjectService getDataObjectService()
public void setDataObjectService(DataObjectService dataObjectService)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.