|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.pdc.model.PdcClassification
@Entity public class PdcClassification
A classification of a content in Silverpeas on the classification plan (named PdC). A classification of a content is made up of one or more positions on the axis of the PdC. Each position consists of one or several values on some PdC's axis. A classification cannot have two or more identical positions; each of them must be unique. It can also represent, for a Silverpeas component instance or for a node in a component instance, a predefined classification with which any published contents can be classified on the PdC. In this case, the contentId attribute is null. A classification can be or not modifiable; by default, a predefined classification, that is used to classify new contents, is not modifiable whereas a classification of a content can be modified.
Field Summary | |
---|---|
static PdcClassification |
NONE_CLASSIFICATION
Represents an empty classification (id est no classification on the PdC). |
Constructor Summary | |
---|---|
protected |
PdcClassification()
Creates an empty classification on the PdC, ready to be completed for a given content published in a given component instance. |
protected |
PdcClassification(long id)
|
Method Summary | |
---|---|
static PdcClassification |
aPdcClassificationOfContent(String contentId,
String inComponentInstanceId)
Creates an empty classification on the PdC of the specified content published in the specified component instance. |
static PdcClassification |
aPredefinedPdcClassificationForComponentInstance(String instanceId)
Creates an empty predefined classification for the contents that will published in the specified component instance. |
PdcClassification |
clone()
|
PdcClassification |
forNode(String nodeId)
|
List<ClassifyPosition> |
getClassifyPositions()
Gets the positions on the PdC of this classification in the form of ClassifyPosition instances. |
String |
getComponentInstanceId()
|
String |
getContentId()
|
Long |
getId()
Gets the unique identifier of this classification on the PdC. |
String |
getNodeId()
|
Set<PdcPosition> |
getPositions()
Gets the positions on the PdC's axis with which the content is classified. |
PdcClassification |
inComponentInstance(String instanceId)
|
boolean |
isEmpty()
Is this classification empty? |
boolean |
isModifiable()
Is the PdC classifications generated from this template can be changed? |
boolean |
isPredefined()
Is this classification on the PdC is a predefined one to classify any new contents in the given node or for the given whole component instance? |
boolean |
isPredefinedForANode()
Is this classification on the PdC is a predefined one for the contents published in a given node? |
boolean |
isPredefinedForTheWholeComponentInstance()
Is this classification on the PdC is a predefined one for the contents published in the given whole component instance? |
PdcClassification |
modifiable()
Sets this PdC classification as modifiable. |
PdcClassification |
ofContent(String contentId)
|
protected void |
setId(Long id)
|
String |
toString()
|
PdcClassification |
unmodifiable()
Sets this PdC classification as unmodifiable. |
void |
updateForPdcAxisValuesDeletion(List<PdcAxisValue> deletedValues)
Updates this classification by removing from its positions the specified values because they will be deleted from the PdC's axis. |
PdcClassification |
withPosition(PdcPosition aPosition)
Adds the specified position on the PdC in this classification. |
PdcClassification |
withPositions(Collection<PdcPosition> thePositions)
Sets the positions on the PdC for this classification. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PdcClassification NONE_CLASSIFICATION
Constructor Detail |
---|
protected PdcClassification()
protected PdcClassification(long id)
Method Detail |
---|
public static PdcClassification aPredefinedPdcClassificationForComponentInstance(String instanceId)
instanceId
- the unique identifier of the component instance to which the predefined
classification will be attached.
public static PdcClassification aPdcClassificationOfContent(String contentId, String inComponentInstanceId)
contentId
- the unique identifier of the content to classify.inComponentInstanceId
- the unique identifier of the component instance in which the
content is published.
public Set<PdcPosition> getPositions()
public boolean isEmpty()
public boolean isModifiable()
public PdcClassification modifiable()
public PdcClassification unmodifiable()
public PdcClassification ofContent(String contentId)
public PdcClassification forNode(String nodeId)
public PdcClassification inComponentInstance(String instanceId)
public String getComponentInstanceId()
public String getContentId()
public String getNodeId()
public boolean isPredefined()
public boolean isPredefinedForTheWholeComponentInstance()
public boolean isPredefinedForANode()
public void updateForPdcAxisValuesDeletion(List<PdcAxisValue> deletedValues)
deletedValues
- the values that are removed from a PdC's axis.public PdcClassification withPositions(Collection<PdcPosition> thePositions)
thePositions
- the position to set in this classification.
public PdcClassification withPosition(PdcPosition aPosition)
aPosition
- a position on the PdC to add in this classification.
public Long getId()
protected void setId(Long id)
public String toString()
toString
in class Object
public PdcClassification clone()
clone
in class Object
public List<ClassifyPosition> getClassifyPositions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |