Class DragAndDropWebEditorStore
- java.lang.Object
-
- org.silverpeas.core.contribution.content.ddwe.model.DragAndDropWebEditorStore
-
- All Implemented Interfaces:
Serializable
,Nameable
,Securable
,SilverpeasResource
public class DragAndDropWebEditorStore extends Object implements SilverpeasResource, Serializable, Securable
Represents the store that register all data manipulated by a Drag & Drop Web Editor.The content is registered in Silverpeas's home data as structured XML file. The save MUST be explicitly performed by calling
save()
method.The structured content is divided into two parts:
- a temporary part that permits to persists current edition and retrieve data whatever the context
- a final part that represents the content to provide when data are validated
- Author:
- silveryocha
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DragAndDropWebEditorStore.Container
Container that contains the different kinds of content (temporary and final ones).static class
DragAndDropWebEditorStore.Content
Content of Drag&Drop web editorstatic class
DragAndDropWebEditorStore.File
Representation of the file containing the structured content.
-
Constructor Summary
Constructors Constructor Description DragAndDropWebEditorStore(ContributionIdentifier contribution)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeAccessedBy(User user)
Checks the given user can access this resource.boolean
canBeModifiedBy(User user)
Checks the given user can modify this resource.boolean
delete()
Deletes the structured content into Silverpeas's home data.ContributionIdentifier
getContributionId()
Gets theContributionIdentifier
of the contribution the content is linked to.Date
getCreationDate()
Gets the date at which the resource has been created.User
getCreator()
Gets the user that has created the resource.String
getDescription()
Gets the description about the object in Silverpeas.Path
getDirectoryPath()
Path to the directory where the file is to be stored.DragAndDropWebEditorStore.File
getFile()
Gets the Silverpeas's file containing the structured content from which Web Editor can perform Drag & Drop edition.ContributionIdentifier
getIdentifier()
Gets the unique identifier of this resource.Date
getLastUpdateDate()
Gets the date at which the resource has been lastly updated.User
getLastUpdater()
Gets the user that has lastly updated the resource.String
getName()
Gets the name of the object in Silverpeas.void
save()
Saves the structured content into Silverpeas's home data.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.security.Securable
canBeDeletedBy, canBeFiledInBy
-
-
-
-
Constructor Detail
-
DragAndDropWebEditorStore
public DragAndDropWebEditorStore(ContributionIdentifier contribution)
-
-
Method Detail
-
getFile
public DragAndDropWebEditorStore.File getFile()
Gets the Silverpeas's file containing the structured content from which Web Editor can perform Drag & Drop edition.- Returns:
- a
DragAndDropWebEditorStore.File
instance.
-
save
public void save()
Saves the structured content into Silverpeas's home data.
-
delete
public boolean delete()
Deletes the structured content into Silverpeas's home data. return true id deletion is well performed (false if file not exists)
-
getName
public String getName()
Description copied from interface:Nameable
Gets the name of the object in Silverpeas.
-
getDescription
public String getDescription()
Description copied from interface:Nameable
Gets the description about the object in Silverpeas.- Specified by:
getDescription
in interfaceNameable
- Returns:
- a short description about the object.
-
getIdentifier
public ContributionIdentifier getIdentifier()
Description copied from interface:SilverpeasResource
Gets the unique identifier of this resource.- Specified by:
getIdentifier
in interfaceSilverpeasResource
- Returns:
- the
ResourceIdentifier
object representing the unique identifier of the resource.
-
getContributionId
public ContributionIdentifier getContributionId()
Gets theContributionIdentifier
of the contribution the content is linked to.- Returns:
- a
ContributionIdentifier
instance.
-
getCreationDate
public Date getCreationDate()
Description copied from interface:SilverpeasResource
Gets the date at which the resource has been created.- Specified by:
getCreationDate
in interfaceSilverpeasResource
- Returns:
- the date of creation of the resource.
-
getLastUpdateDate
public Date getLastUpdateDate()
Description copied from interface:SilverpeasResource
Gets the date at which the resource has been lastly updated. If the resource doesn't have such an information, then this method should return the date of the resource creation.- Specified by:
getLastUpdateDate
in interfaceSilverpeasResource
- Returns:
- the date of the last update of the resource.
-
getCreator
public User getCreator()
Description copied from interface:SilverpeasResource
Gets the user that has created the resource.- Specified by:
getCreator
in interfaceSilverpeasResource
- Returns:
- a
User
in Silverpeas.
-
getLastUpdater
public User getLastUpdater()
Description copied from interface:SilverpeasResource
Gets the user that has lastly updated the resource. If the resource doesn't have such an information, then this method should return the user that has created the resource.- Specified by:
getLastUpdater
in interfaceSilverpeasResource
- Returns:
- a
User
in Silverpeas.
-
getDirectoryPath
public Path getDirectoryPath()
Path to the directory where the file is to be stored.- Returns:
- the path to the directory where the file is to be stored.
-
canBeAccessedBy
public boolean canBeAccessedBy(User user)
Description copied from interface:Securable
Checks the given user can access this resource.- Specified by:
canBeAccessedBy
in interfaceSecurable
- Parameters:
user
- a user in Silverpeas.- Returns:
- true if the user can access the data managed by this instance, false otherwise.
-
canBeModifiedBy
public boolean canBeModifiedBy(User user)
Description copied from interface:Securable
Checks the given user can modify this resource. By default, if the user can access this securable resource, then it can also modify it.- Specified by:
canBeModifiedBy
in interfaceSecurable
- Parameters:
user
- a user in Silverpeas.- Returns:
- true if the user can modify the data managed by this instance, false otherwise.
-
-