Class PublicationSelection
- java.lang.Object
-
- org.silverpeas.core.clipboard.ClipboardSelection
-
- org.silverpeas.core.contribution.publication.model.PublicationSelection
-
- All Implemented Interfaces:
ClipboardOwner
,Transferable
,Serializable
public class PublicationSelection extends ClipboardSelection implements Serializable
Selection of a single publication in a given component instance.In the case the selection is about a publication alias, the original publication is then specified here as being the selected publication, not the alias. So, the component instance attribute of the publication cannot be used to identify the component instance in which the selection is done. This is why it is necessary to specify the component instance in which the selection was done when constructing such this object.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PublicationSelection.TransferData
The data that is carried in the case of a publication selection.
-
Field Summary
Fields Modifier and Type Field Description static DataFlavor
PublicationDetailFlavor
-
Fields inherited from class org.silverpeas.core.clipboard.ClipboardSelection
IndexFlavor, selected, SilverpeasKeyDataFlavor, supportedFlavorsList
-
-
Constructor Summary
Constructors Constructor Description PublicationSelection(PublicationDetail pub, NodePK fatherPK)
Constructs a new selection of a single publication in a given component instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexEntry
getIndexEntry()
-------------------------------------------------------------------------- ------------------------------SilverpeasKeyData
getKeyData()
-------------------------------------------------------------------------- ------------------------------ Tranformation obligatoire en SilverpeasKeyDataObject
getTransferData(DataFlavor parFlavor)
-------------------------------------------------------------------------- -------------------------------
Methods inherited from class org.silverpeas.core.clipboard.ClipboardSelection
addFlavor, getTransferDataFlavors, isCutted, isDataFlavorSupported, isSelected, lostOwnership, setCutted, setSelected
-
-
-
-
Field Detail
-
PublicationDetailFlavor
public static final DataFlavor PublicationDetailFlavor
-
-
Constructor Detail
-
PublicationSelection
public PublicationSelection(PublicationDetail pub, NodePK fatherPK)
Constructs a new selection of a single publication in a given component instance.- Parameters:
pub
- the publication that is selected.fatherPK
- the identifier of the resource that is the father of the publication. That is to say the resource to which is linked directly the publication. If the father is the component instance itself, then theWAPrimaryKey.getId()
can be null.
-
-
Method Detail
-
getTransferData
@Nonnull public Object getTransferData(DataFlavor parFlavor) throws UnsupportedFlavorException
-------------------------------------------------------------------------- ------------------------------- Specified by:
getTransferData
in interfaceTransferable
- Overrides:
getTransferData
in classClipboardSelection
- Throws:
UnsupportedFlavorException
-
getIndexEntry
public IndexEntry getIndexEntry()
-------------------------------------------------------------------------- ------------------------------- Specified by:
getIndexEntry
in classClipboardSelection
- Returns:
-
getKeyData
public SilverpeasKeyData getKeyData()
-------------------------------------------------------------------------- ------------------------------ Tranformation obligatoire en SilverpeasKeyData- Specified by:
getKeyData
in classClipboardSelection
- Returns:
-
-