Class DefaultPdcUtilizationService
- java.lang.Object
-
- org.silverpeas.core.pdc.pdc.service.DefaultPdcUtilizationService
-
- All Implemented Interfaces:
ComponentInstanceDeletion
,PdcUtilizationService
@Service public class DefaultPdcUtilizationService extends Object implements PdcUtilizationService, ComponentInstanceDeletion
- Author:
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultPdcUtilizationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addUsedAxis(UsedAxis usedAxis, String treeId)
Create an used axis into the data base.void
delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance.void
deleteUsedAxis(String usedAxisId)
delete the used axis from the data basevoid
deleteUsedAxis(Collection<String> usedAxisIds)
Delete a collection of used axisvoid
deleteUsedAxisByAxisId(Connection con, String axisId)
Method declarationvoid
deleteUsedAxisByMotherValue(Connection con, String valueId, String axisId, String treeId)
List<AxisHeader>
getAxisHeaderUsedByInstanceIds(List<String> instanceIds)
UsedAxis
getUsedAxis(String usedAxisId)
Returns an axis used by an instanceList<UsedAxis>
getUsedAxisByInstanceId(String instanceId)
Returns a list of used axis sorted.void
updateOrDeleteBaseValue(Connection con, int baseValueToUpdate, int newBaseValue, int axisId, String treeId)
int
updateUsedAxis(UsedAxis usedAxis, String treeId)
Update an used axis into the data base.
-
-
-
Method Detail
-
getUsedAxis
public UsedAxis getUsedAxis(String usedAxisId) throws PdcException
Returns an axis used by an instance- Specified by:
getUsedAxis
in interfacePdcUtilizationService
- Parameters:
usedAxisId
- - the whished used axis.- Returns:
- an UsedAxis
- Throws:
PdcException
-
getUsedAxisByInstanceId
public List<UsedAxis> getUsedAxisByInstanceId(String instanceId) throws PdcException
Returns a list of used axis sorted.- Specified by:
getUsedAxisByInstanceId
in interfacePdcUtilizationService
- Parameters:
instanceId
- - the id of the Job'Peas- Returns:
- a list sorted or null otherwise
- Throws:
PdcException
-
getAxisHeaderUsedByInstanceIds
public List<AxisHeader> getAxisHeaderUsedByInstanceIds(List<String> instanceIds) throws PdcException
- Specified by:
getAxisHeaderUsedByInstanceIds
in interfacePdcUtilizationService
- Throws:
PdcException
-
addUsedAxis
public int addUsedAxis(UsedAxis usedAxis, String treeId) throws PdcException
Create an used axis into the data base.- Specified by:
addUsedAxis
in interfacePdcUtilizationService
- Parameters:
usedAxis
- - the object which contains all data about utilization of an axistreeId
-- Returns:
- usedAxisId
- Throws:
PdcException
-
updateUsedAxis
public int updateUsedAxis(UsedAxis usedAxis, String treeId) throws PdcException
Update an used axis into the data base.- Specified by:
updateUsedAxis
in interfacePdcUtilizationService
- Parameters:
usedAxis
- - the object which contains all data about utilization of the axis- Returns:
- - 0 si, pour une même instance de Job'Peas, il n'existe pas déjà un axe avec comme valeur de base un ascendant ou un descendant - 1 sinon
- Throws:
PdcException
-
deleteUsedAxis
public void deleteUsedAxis(String usedAxisId) throws PdcException
delete the used axis from the data base- Specified by:
deleteUsedAxis
in interfacePdcUtilizationService
- Parameters:
usedAxisId
- - the id of the used axe- Throws:
PdcException
-
deleteUsedAxis
public void deleteUsedAxis(Collection<String> usedAxisIds) throws PdcException
Description copied from interface:PdcUtilizationService
Delete a collection of used axis- Specified by:
deleteUsedAxis
in interfacePdcUtilizationService
- Parameters:
usedAxisIds
-- Throws:
PdcException
-
deleteUsedAxisByAxisId
public void deleteUsedAxisByAxisId(Connection con, String axisId) throws PdcException
Method declaration- Specified by:
deleteUsedAxisByAxisId
in interfacePdcUtilizationService
- Parameters:
con
-axisId
-- Throws:
PdcException
-
deleteUsedAxisByMotherValue
public void deleteUsedAxisByMotherValue(Connection con, String valueId, String axisId, String treeId) throws PdcException
- Specified by:
deleteUsedAxisByMotherValue
in interfacePdcUtilizationService
- Parameters:
con
-valueId
-axisId
-treeId
-- Throws:
PdcException
-
updateOrDeleteBaseValue
public void updateOrDeleteBaseValue(Connection con, int baseValueToUpdate, int newBaseValue, int axisId, String treeId) throws PdcException
- Specified by:
updateOrDeleteBaseValue
in interfacePdcUtilizationService
- Throws:
PdcException
-
delete
public void delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance. This method is invoked by Silverpeas when a component instance is being deleted.- Specified by:
delete
in interfaceComponentInstanceDeletion
- Parameters:
componentInstanceId
- the unique identifier of a component instance.
-
-