Package com.axemble.vdoc.sdk.impl
Class PortalFile
java.lang.Object
com.axemble.vdoc.sdk.impl.AbstractElement
com.axemble.vdoc.sdk.impl.PortalElement
com.axemble.vdoc.sdk.impl.PortalFile
- All Implemented Interfaces:
IElement
,IFile
,ILibraryElement
,IResource
,IDeletionSupport
,IExternalSupport
,IProtocolSupport
,ISearchSupport
,ISecuritySupport
,ITrashSupport
,IUriSupport
,Serializable
- Author:
- vlygeros
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.axemble.webdrive.om.DocumentNode
protected IResourceHistory
Fields inherited from class com.axemble.vdoc.sdk.impl.PortalElement
path, storageKey
Fields inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
module
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCategories
(Collection categories) Associates a collection ofICategory
objects to the file.void
addCategory
(ICategory category) Associates a category to the file.boolean
addLinkedResource
(ILinkedResource linkedResource) Allows to add a linked resource.boolean
addLinkedResources
(Collection linkedResources) Allows to add linked resources.void
Allows events to be thrown.Retrieve the user who checked out the file.void
checkIn()
Check in a file.void
checkOut()
Check out a file.createLinkedResource
(String propertyName) Creates a linked resource within a property.void
Deletes theIElement
object.void
Delete the element from the trash.void
deleteLinkedResource
(ILinkedResource linkedResource) Allows to remove a linked resource.void
deleteLinkedResources
(Collection linkedResources) Allows to remove a collection of linked resources.void
Prevents from throwing events.boolean
Checks if a property exists.Gets all the associated categories.Gets the creator of the resource.Gets the created date.Gets the definition of the resourceGets the description of the file.Gets the history of the resourceGets the language of the file.Gets the library.getLinkedResources
(String propertyName) Retrieves all the linked resources of a property.Gets the available values of a list property.Gets the last user who modified the resource.Gets the modified date.getName()
Gets the name of a resource.Gets the native object underneath.Gets the parent folder.getURI()
Gets the URI of the object supporting this interfaceGets the value of a property.boolean
Check if the file has been checked out.boolean
Check if the element has been sent to the trash.boolean
Move a file to a folder.void
Move the element to the trash.void
refresh()
Refresh all children values cachevoid
Refresh children cache for given propertyvoid
removeCategories
(Collection categories) Removes the associations between the file and the collection of categories.void
removeCategory
(ICategory category) Removes the association between the file and the specified category.void
Restore the element from the trash.boolean
save()
Saves the resource.boolean
Saves or updates the element.boolean
Saves a specified property.void
setCreatedBy
(IUser user) Sets the creator of the resource.void
setCreatedDate
(Date date) Sets the created date.void
setDefinition
(IResourceDefinition definition) Associates the specified definition with the file.void
setDescription
(String description) Sets the description of the file.void
setLanguage
(String language) Sets the language of the file.void
setList
(String propertyName, Collection value) Sets the available values for a list property.void
setModifiedBy
(IUser user) Sets last user who modified the resource.void
setModifiedDate
(Date date) Sets the modified date.void
Sets the name of the file.void
Sets a value to a propertyvoid
setValueNoEvents
(String propertyName, Object value) Sets a value to a property without throwing any event.void
Undo check out.Methods inherited from class com.axemble.vdoc.sdk.impl.PortalElement
equals, getId, getPath, getProtocolURI, getProtocolURI, hashCode, replaceBackSlash, replaceSlash, setId
Methods inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
getModule
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.axemble.vdoc.sdk.supports.IProtocolSupport
getProtocolURI, getProtocolURI
-
Field Details
-
document
protected com.axemble.webdrive.om.DocumentNode document -
history
-
-
Constructor Details
-
PortalFile
-
-
Method Details
-
getNativeObject
Description copied from interface:IElement
Gets the native object underneath.- Specified by:
getNativeObject
in interfaceIElement
- Returns:
- an object.
-
getExternalClassName
- Specified by:
getExternalClassName
in interfaceIExternalSupport
-
getExternalNativeId
- Specified by:
getExternalNativeId
in interfaceIExternalSupport
-
setName
Description copied from interface:IFile
Sets the name of the file. -
getURI
Description copied from interface:IUriSupport
Gets the URI of the object supporting this interface- Specified by:
getURI
in interfaceIUriSupport
- Returns:
- A String object.
-
getName
Description copied from interface:IResource
Gets the name of a resource.- Specified by:
getName
in interfaceILibraryElement
- Specified by:
getName
in interfaceIResource
- Returns:
- a string object.
-
setDescription
Description copied from interface:IFile
Sets the description of the file.- Specified by:
setDescription
in interfaceIFile
- Parameters:
description
- the new description to set.
-
getDescription
Description copied from interface:IFile
Gets the description of the file.- Specified by:
getDescription
in interfaceIFile
- Specified by:
getDescription
in interfaceILibraryElement
- Returns:
- a
String
of the file.
-
getCreatedDate
Description copied from interface:IResource
Gets the created date.- Specified by:
getCreatedDate
in interfaceIResource
- Returns:
- a
Date
object.
-
setCreatedDate
Description copied from interface:IResource
Sets the created date.- Specified by:
setCreatedDate
in interfaceIResource
- Parameters:
date
- TheDate
to set.
-
getModifiedDate
Description copied from interface:IResource
Gets the modified date.- Specified by:
getModifiedDate
in interfaceIResource
- Returns:
- a
Date
object.
-
setModifiedDate
Description copied from interface:IResource
Sets the modified date.- Specified by:
setModifiedDate
in interfaceIResource
- Parameters:
date
- TheDate
to set.
-
setCreatedBy
Description copied from interface:IResource
Sets the creator of the resource. Can only be set if the resource has not been created yet- Specified by:
setCreatedBy
in interfaceIResource
- Parameters:
user
- The creatorIUser
of the resource.
-
getCreatedBy
Description copied from interface:IResource
Gets the creator of the resource.- Specified by:
getCreatedBy
in interfaceIResource
- Returns:
- a
IUser
object.
-
setModifiedBy
Description copied from interface:IResource
Sets last user who modified the resource.- Specified by:
setModifiedBy
in interfaceIResource
- Parameters:
user
- The lastIUser
who modified the resource.
-
getModifiedBy
Description copied from interface:IResource
Gets the last user who modified the resource.- Specified by:
getModifiedBy
in interfaceIResource
- Returns:
- a
IUser
object.
-
setLanguage
Description copied from interface:IFile
Sets the language of the file.- Specified by:
setLanguage
in interfaceIFile
- Parameters:
language
- the language to set.
-
getLanguage
Description copied from interface:IFile
Gets the language of the file.- Specified by:
getLanguage
in interfaceIFile
- Returns:
- a
String
of the file.
-
addCategory
Description copied from interface:IFile
Associates a category to the file.- Specified by:
addCategory
in interfaceIFile
- Parameters:
category
- theICategory
to add.
-
addCategories
Description copied from interface:IFile
Associates a collection ofICategory
objects to the file.- Specified by:
addCategories
in interfaceIFile
- Parameters:
categories
- a collection ofICategory
objects.
-
exists
Description copied from interface:IResource
Checks if a property exists. -
setValueNoEvents
Description copied from interface:IResource
Sets a value to a property without throwing any event.- Specified by:
setValueNoEvents
in interfaceIResource
- Parameters:
propertyName
- The system name of the property.value
- The value object to set.
-
setValue
Description copied from interface:IResource
Sets a value to a property -
getValue
Description copied from interface:IResource
Gets the value of a property. -
getList
Description copied from interface:IResource
Gets the available values of a list property.- Specified by:
getList
in interfaceIResource
- Parameters:
propertyName
- The system name of the property.- Returns:
- A java.util.Collection of
IOptionList.IOption
.
-
setList
Description copied from interface:IResource
Sets the available values for a list property.- Specified by:
setList
in interfaceIResource
- Parameters:
propertyName
- The system name of the property.value
- A java.util.Collection ofIOptionList.IOption
objects..
-
getLibrary
Description copied from interface:IFile
Gets the library.- Specified by:
getLibrary
in interfaceIFile
- Returns:
- a
ILibrary
object.
-
getParentFolder
Description copied from interface:IFile
Gets the parent folder.- Specified by:
getParentFolder
in interfaceIFile
- Returns:
- a
IFolder
object.
-
getHistory
Description copied from interface:IResource
Gets the history of the resource- Specified by:
getHistory
in interfaceIResource
- Returns:
- a
IResourceHistory
object.
-
getDefinition
Description copied from interface:IResource
Gets the definition of the resource- Specified by:
getDefinition
in interfaceIResource
- Returns:
- A
IResourceDefinition
object.
-
setDefinition
Description copied from interface:IFile
Associates the specified definition with the file.- Specified by:
setDefinition
in interfaceIFile
- Parameters:
definition
- theIResourceDefinition
object.
-
createLinkedResource
Description copied from interface:IResource
Creates a linked resource within a property.- Specified by:
createLinkedResource
in interfaceIResource
- Parameters:
propertyName
- The system name of the property.- Returns:
- a
ILinkedResource
object.
-
addLinkedResource
Description copied from interface:IResource
Allows to add a linked resource.- Specified by:
addLinkedResource
in interfaceIResource
- Parameters:
linkedResource
- TheILinkedResource
to add.- Returns:
- true if succeed,
invalid @link
{@link false
-
addLinkedResources
Description copied from interface:IResource
Allows to add linked resources.- Specified by:
addLinkedResources
in interfaceIResource
- Parameters:
linkedResources
- The collection ofILinkedResource
objects to add.- Returns:
- true if succeed,
invalid @link
{@link false
-
getLinkedResources
Description copied from interface:IResource
Retrieves all the linked resources of a property.- Specified by:
getLinkedResources
in interfaceIResource
- Parameters:
propertyName
- The system name of the property.- Returns:
- A java.util.Collection of
ILinkedResource
objects.
-
save
Description copied from interface:IElement
Saves or updates the element.- Specified by:
save
in interfaceIElement
- Overrides:
save
in classPortalElement
- Parameters:
context
- The Execution context.- Returns:
- return true if succeeded, false otherwise.
-
save
public boolean save()Description copied from interface:IResource
Saves the resource. -
save
Description copied from interface:IResource
Saves a specified property. -
delete
Description copied from interface:IDeletionSupport
Deletes theIElement
object.- Specified by:
delete
in interfaceIDeletionSupport
- Parameters:
context
- The Execution context.
-
allowEvents
public void allowEvents()Description copied from interface:IResource
Allows events to be thrown.- Specified by:
allowEvents
in interfaceIResource
-
denyEvents
public void denyEvents()Description copied from interface:IResource
Prevents from throwing events.- Specified by:
denyEvents
in interfaceIResource
-
removeCategories
Description copied from interface:IFile
Removes the associations between the file and the collection of categories.- Specified by:
removeCategories
in interfaceIFile
- Parameters:
categories
- the collection ofICategory
objects to remove.
-
removeCategory
Description copied from interface:IFile
Removes the association between the file and the specified category.- Specified by:
removeCategory
in interfaceIFile
- Parameters:
category
- theICategory
object to remove.
-
getCategories
Description copied from interface:IFile
Gets all the associated categories.- Specified by:
getCategories
in interfaceIFile
- Returns:
- a collection of
ICategory
objects.
-
deleteLinkedResource
Description copied from interface:IResource
Allows to remove a linked resource.- Specified by:
deleteLinkedResource
in interfaceIResource
- Parameters:
linkedResource
- TheILinkedResource
to remove.
-
deleteLinkedResources
Description copied from interface:IResource
Allows to remove a collection of linked resources.- Specified by:
deleteLinkedResources
in interfaceIResource
- Parameters:
linkedResources
- The collection ofILinkedResource
objects.
-
checkIn
public void checkIn()Description copied from interface:IFile
Check in a file. -
checkOut
public void checkOut()Description copied from interface:IFile
Check out a file. -
undoCheckOut
public void undoCheckOut()Description copied from interface:IFile
Undo check out.- Specified by:
undoCheckOut
in interfaceIFile
-
checkedOutBy
Description copied from interface:IFile
Retrieve the user who checked out the file.- Specified by:
checkedOutBy
in interfaceIFile
- Returns:
- a
IUser
object.
-
isCheckedOut
public boolean isCheckedOut()Description copied from interface:IFile
Check if the file has been checked out.- Specified by:
isCheckedOut
in interfaceIFile
- Returns:
- true if the file has been checked out, false otherwise.
-
moveTo
Description copied from interface:IFile
Move a file to a folder. -
refresh
public void refresh()Description copied from interface:IResource
Refresh all children values cache -
refresh
Description copied from interface:IResource
Refresh children cache for given property -
getText
-
isInTrash
public boolean isInTrash()Description copied from interface:ITrashSupport
Check if the element has been sent to the trash.- Specified by:
isInTrash
in interfaceITrashSupport
- Returns:
- true if yes,
invalid @link
{@link false
-
restoreFromTrash
public void restoreFromTrash()Description copied from interface:ITrashSupport
Restore the element from the trash.- Specified by:
restoreFromTrash
in interfaceITrashSupport
-
moveToTrash
public void moveToTrash()Description copied from interface:ITrashSupport
Move the element to the trash.- Specified by:
moveToTrash
in interfaceITrashSupport
-
deleteFromTrash
public void deleteFromTrash()Description copied from interface:ITrashSupport
Delete the element from the trash.- Specified by:
deleteFromTrash
in interfaceITrashSupport
-