@Transactional 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)
ComponentServiceComponent with the given namespaceCode and
componentCodegetComponentByCode in interface ComponentServicenamespaceCode - the namespaceCode of the componentcomponentCode - the componentCode of the componentpublic List<Component> getAllComponentsByNamespaceCode(String namespaceCode)
ComponentServiceComponent with the
given namespaceCodegetAllComponentsByNamespaceCode in interface ComponentServicenamespaceCode - the namespaceCode of the componentpublic List<Component> getActiveComponentsByNamespaceCode(String namespaceCode)
ComponentServiceComponent with the
given namespaceCodegetActiveComponentsByNamespaceCode in interface ComponentServicenamespaceCode - the namespaceCode of the componentpublic List<Component> getDerivedComponentSet(String componentSetId)
ComponentServiceComponent with the
given componentSetIdgetDerivedComponentSet in interface ComponentServicecomponentSetId - the componentSetId of the componentpublic void publishDerivedComponents(String componentSetId, List<Component> components)
ComponentServiceWhen 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 ComponentServicecomponentSetId - 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–2014 The Kuali Foundation. All rights reserved.