|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.pdc.web.PdcServiceProvider
@Named public class PdcServiceProvider
A provider of services on the classification plan (named PdC). This class implements the adaptor pattern by wrapping all the features about the PdC and provided by several business services so that an unified and a unique access point is provided to the PdC web resources. The instances of this class are managed by the IoC container and can be then injected as dependency into the PdC web resources.
Constructor Summary | |
---|---|
PdcServiceProvider()
|
Method Summary | |
---|---|
void |
addPosition(ClassifyPosition position,
String contentId,
String componentId)
Adds a new position of the specified resource content on the PdC configured for the specified Silverpeas component instance. |
void |
deletePosition(int positionId,
String contentId,
String componentId)
Deletes the specified position of the specified resource content on the PdC configured for the specified component instance. |
static String |
forContentOfId(String contentId)
A convenient method to enhance the readability of method calls when a resource content identifier is expected as argument. |
List<Axis> |
getAllAxis()
Gets all the axis of the PdC in Silverpeas. |
List<ClassifyPosition> |
getAllPositions(String contentId,
String componentId)
Gets the positions of the specified resource content on the PdC of the specified component instance. |
List<UsedAxis> |
getAxisUsedInClassificationsByCriteria(PdcFilterCriteria criteria)
Gets the axis and, for each of them, the values that are used in the classification of the contents that match the specified criteria. |
List<UsedAxis> |
getAxisUsedInPdcFor(String componentId)
Gets the axis used in the PdC configured for the specified Silverpeas component instance. |
List<UsedAxis> |
getAxisUsedInPdcToClassify(String contentId,
String inComponentId)
Gets the axis used in the PdC configured for the specified component instance in order to classify the specified resource content. |
OrganisationController |
getOrganisationController()
|
UserThesaurusHolder |
getThesaurusOfUser(UserDetail user)
Gets a holder of the thesaurus for the specified user. |
static String |
inComponentOfId(String componentId)
A convenient method to enhance the readability of method calls when a component identifier is expected as argument. |
void |
updatePosition(ClassifyPosition position,
String contentId,
String componentId)
Updates the specified position of the specified resource content on the PdC configured for the specified Silverpeas component instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PdcServiceProvider()
Method Detail |
---|
public static String inComponentOfId(String componentId)
componentId
- the identifier of a Silverpeas component instance.
public static String forContentOfId(String contentId)
contentId
- the identifier of a Silverpeas resource content.
public void addPosition(ClassifyPosition position, String contentId, String componentId) throws ContentManagerException, PdcException
position
- the classification position to add.contentId
- the identifier of the content for which a new position is created on the PdC.componentId
- the identifier of the component instance that owns the PdC instance.
ContentManagerException
- if no such content or component instance exists with the
specified identifier.
PdcException
- if the position adding fails.public void updatePosition(ClassifyPosition position, String contentId, String componentId) throws ContentManagerException, PdcException
position
- the classification position to update.contentId
- the identifier of the content for which the position is to update on the PdC.componentId
- the identifier of the component instance that owns the PdC instance.
ContentManagerException
- if no such content or component instance exists with the
specified identifier.
PdcException
- if the position update fails.public void deletePosition(int positionId, String contentId, String componentId) throws PdcException, ContentManagerException
positionId
- the identifier of the position to delete.componentId
- the identifier of the component that owns the PdC instance.
PdcException
- if the position or the component identifier doesn't exist or if the
deletion fails.
ContentManagerException
public List<ClassifyPosition> getAllPositions(String contentId, String componentId) throws ContentManagerException, PdcException
contentId
- the identifier of the content.componentId
- the identifier of the Silverpeas component instance.
ContentManagerException
- if no such content or component instance exists with the
specified identifier.
PdcException
- if the position fetching fails.public List<UsedAxis> getAxisUsedInPdcToClassify(String contentId, String inComponentId) throws ContentManagerException, PdcException
contentId
- the identifier of the content to classify (or to refine the classification).
It is used to find its previous classification in order to fix the value of the invariant axis.inComponentId
- the identifier of the component instance.
ContentManagerException
- if no such content or component instance exists with the
specified identifier.
PdcException
- if the axis cannot be fetched.public List<UsedAxis> getAxisUsedInPdcFor(String componentId) throws PdcException
componentId
- the unique identifier of the component instance.
PdcException
- if the axis cannot be fetched.public UserThesaurusHolder getThesaurusOfUser(UserDetail user)
user
- the user for which a holder will hold the thesaurus.
public List<UsedAxis> getAxisUsedInClassificationsByCriteria(PdcFilterCriteria criteria) throws PdcException
criteria
- the criteria the classified contents have to satisfy. The expected criteria are
on the component instance or the workspace in which they were published, on some axis values
with which they were classified, and on the inclusion of the secondary axis.
PdcException
- if an error occurs while getting the PdC's axis that are used in a
classification.public List<Axis> getAllAxis() throws PdcException
PdcException
- if an error occurs while getting the PdC's axis.public OrganisationController getOrganisationController()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |