public class PDFolders extends ObjPD
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
fACL
Name of the attribute containing the ACL of the folder
|
static java.lang.String |
fFOLDTYPE
Name of the attribute containing the document type of the document
|
static java.lang.String |
fGRANTPARENTID
Name of the attribute containing the Identifier of ANY of the folders that "contains" the folder
|
static java.lang.String |
fPARENTID
Name of the attribute containing the Identifier of the folder that "contains" the folder
|
static java.lang.String |
fPDID
Name of the attribute identifier of the Folder
|
static java.lang.String |
fTITLE
Name of the attribute containing the "name" of the folder
|
static java.lang.String |
ROOTFOLDER
Constant with the value of the base folder, that is folder containing ALL the folders
|
static java.lang.String |
SYSTEMFOLDER
Constant with the value of the folderdefined for storing tchnical/system documents and elements
|
static java.lang.String |
USERSFOLDER
Constant with the value of the folder containing users personal folders
|
AllowedChars, fPDAUTOR, fPDDATE, SYN_ADD, SYN_DEL, SYN_PARENT, SYN_SEP, SYN_THES, XML_Attr, XML_Field, XML_Group, XML_GroupMembers, XML_ListAttr, XML_Metadata, XML_OPDList, XML_OPDObject, XML_User, XML_UserMembers
Constructor and Description |
---|
PDFolders(DriverGeneric Drv)
Default constructor that creates a Folder of the default Foldertype
|
PDFolders(DriverGeneric Drv,
java.lang.String pFoldType)
Default constructor that creates a document of the specified foldertype
|
Modifier and Type | Method and Description |
---|---|
void |
assignValues(Record Rec)
Assign the values of the record to the fields of the object
|
java.lang.String |
CreateChild(java.lang.String FoldName)
Creates a new folder under the current object with inherited ACL,
default folder type and the name FoldName
|
void |
delete()
Deletes the folder and all the documents and subfolders contained recursively
If the number of folders, documents and levels is too big, this method can
create problems in the rollback of the database storing the metadata
|
void |
ExportDocs(java.lang.String Path)
Export All documents in folder
|
java.lang.String |
GenerateId()
Generates an unique identifier
|
java.lang.String |
getACL() |
Cursor |
getAll()
Overrided method in generic OpenProdoc object.
|
java.lang.String |
getFolderType() |
java.lang.String |
GetIdChild(java.lang.String ParentId,
java.lang.String FoldName)
Returns the Id of a folder with name FoldName child of folder ParentId
|
java.lang.String |
getIdPath(java.lang.String FoldName)
Travels by the path to find the Id of last folder in path
|
java.util.HashSet |
getListDescendList(java.lang.String PDId)
return a list of folders contained (at any level) in the forlder specified
|
java.util.HashSet<java.lang.String> |
getListDirectDescendList(java.lang.String PDId)
Return a list of all the folders of any type whose DIRECT parent is PDId
|
java.util.HashSet |
getListGrandParentList(java.lang.String Parent)
Search the list of folders that contain the specified folder
|
java.lang.String |
getParentId() |
java.lang.String |
getPathId(java.lang.String Id)
From a Id generates the "path" as a Filesystem
|
java.lang.String |
getPDId() |
Record |
getRecord()
Constructs a record with all the attributes of the folder type and the values
of the attributes asigned using the setter of the class.
|
static Record |
getRecordStructPDFolder()
Return a copy of the static structure of attributes for the class
|
Record |
getRecSum()
Return all the Attributes for the current folder type
empty or filled (depending if it has been used)
if needed loads the definition
|
static java.lang.String |
getTableName()
static equivalent method to getTabName() that returns the name
|
java.lang.String |
getTabName()
object "method" needed because static overloading doesn't work in java
|
java.lang.String |
getTitle() |
java.util.ArrayList<Record> |
getTypeDefs()
Return an ordered list of the hierarchy of folder types from whom this
folder type inherit its attributes
|
java.util.ArrayList<Record> |
getTypeRecs()
Returns the collection of attributes of the folder type and its ancestors
loads the definition if there are not loaded
|
PDFolders |
ImportXMLNode(org.w3c.dom.Node OPDObject,
java.lang.String ParentFolderId,
boolean MaintainId)
Import a Folder(s) described by an XML with content referenced
|
void |
insert()
Creates a folder
|
static void |
Install(DriverGeneric Drv)
The install method is generic because for instantiate a object, the class
need to access to the tables for definition
|
boolean |
IsUnder(java.lang.String ParentId)
Return true if the current folder Object is under ParentId
|
Record |
Load(java.lang.String Ident)
Loads the standard attributes of folder identified by Ident
|
Record |
LoadFull(java.lang.String Ident)
Load to memory all the elements of a Folder, including all the inherited attributes and multivalued
|
Record |
LoadRefresh(java.lang.String Ident)
Loads the standard attributes of folder identified by Ident
|
boolean |
Move(java.lang.String NewParentId)
Move a Folder from its current forlder to another one
|
PDFolders |
NextFold(Cursor Res)
Receives a cursor created with method Search and returns the next folder or null if
there are no more.
|
java.util.ArrayList |
OrderedGrandParents(java.lang.String Id)
Returns a Collection containing an ordered set of parent, from father to root.
|
PDFolders |
ProcessXML(java.io.File XMLFile,
java.lang.String ParentFolderId)
Process and XML file
|
Cursor |
Search(java.lang.String FolderType,
Conditions AttrConds,
boolean SubTypes,
boolean SubFolders,
java.lang.String IdActFold,
java.util.Vector Ord)
Search for Folders returning a cursor with the results of folders with the
indicated values of fields.
|
java.util.Vector<Record> |
SearchV(java.lang.String FolderType,
Conditions AttrConds,
boolean SubTypes,
boolean SubFolders,
java.lang.String IdActFold,
java.util.Vector Ord)
Search for Folders returning a cursor with the results of folders with the
indicated values of fields.
|
void |
setACL(java.lang.String pACL)
Sets the name of the ACL
|
void |
setFolderType(java.lang.String pFolderType)
Assigns the Folder Type, forcing to reload the definition of type and metadata
|
void |
setParentId(java.lang.String pParentId)
Sets the parent folder of the current object
|
void |
setPDId(java.lang.String pPDId)
Sets the unique identifier
|
void |
setTitle(java.lang.String pTitle)
Sets the Folder title/name
|
java.lang.String |
toHtml()
Returns all the data of the doc as html
|
java.lang.String |
toString()
Overloaded method for converting to String
|
void |
update()
Updates the metadata of the folder
|
CheckName, Clear, EndXML, getDrv, getPDAutor, getPDDate, Install, ProcesXMLNode, SearchLike, SearchLikeDesc, SearchQBE, SearchSelect, SearchSelectV, setDrv, StartXML, String2BD, toXML, unInstall
public static final java.lang.String fPDID
public static final java.lang.String fTITLE
public static final java.lang.String fACL
public static final java.lang.String fFOLDTYPE
public static final java.lang.String fPARENTID
public static final java.lang.String fGRANTPARENTID
public static final java.lang.String ROOTFOLDER
public static final java.lang.String USERSFOLDER
public static final java.lang.String SYSTEMFOLDER
public PDFolders(DriverGeneric Drv) throws PDException
Drv
- Driver generic to use for reading and writingPDException
- In any errorpublic PDFolders(DriverGeneric Drv, java.lang.String pFoldType) throws PDException
Drv
- Driver generic to use for reading and writingpFoldType
- Type of folder to createPDException
- In any errorpublic void assignValues(Record Rec) throws PDException
assignValues
in class ObjPD
Rec
- values to assignPDException
- In any errorpublic java.lang.String getPDId()
public void setPDId(java.lang.String pPDId) throws PDExceptionFunc
pPDId
- Identifier to setPDExceptionFunc
- In any errorpublic java.lang.String getTitle()
public void setTitle(java.lang.String pTitle) throws PDExceptionFunc
pTitle
- Value to setPDExceptionFunc
- in any errorpublic java.lang.String getTabName()
getTabName
in class ObjPD
public static java.lang.String getTableName()
public static void Install(DriverGeneric Drv) throws PDException
Drv
- Genereric driverPDException
- in any errorpublic Record getRecord() throws PDException
getRecord
in class ObjPD
PDException
- in any errorpublic static Record getRecordStructPDFolder() throws PDException
PDException
- In any errorpublic java.lang.String getACL()
public void setACL(java.lang.String pACL)
pACL
- ACL to assignpublic java.lang.String getFolderType()
public void setFolderType(java.lang.String pFolderType) throws PDException
pFolderType
- Type to assignPDException
- in any errorpublic void insert() throws PDException
insert
in class ObjPD
PDException
- In any errorpublic java.lang.String getParentId()
public void setParentId(java.lang.String pParentId)
pParentId
- Id of parent folderpublic java.lang.String GenerateId()
public java.util.ArrayList<Record> getTypeDefs() throws PDException
PDException
- if there is a problem comunicating with the serverpublic java.util.ArrayList<Record> getTypeRecs() throws PDException
PDException
- In any errorpublic java.util.HashSet getListGrandParentList(java.lang.String Parent) throws PDException
Parent
- Folder Id to lok for the hierachyPDException
- In any errorpublic java.util.HashSet getListDescendList(java.lang.String PDId) throws PDException
PDId
- Identifier of folder to look for descendantPDException
- In any errorpublic Record getRecSum() throws PDException
PDException
- in any errorpublic void delete() throws PDException
delete
in class ObjPD
PDException
- in any problem and cancels the Transaction. When not enough permissions throws PDFuncException.public void update() throws PDException
update
in class ObjPD
PDException
- In any errorpublic java.util.HashSet<java.lang.String> getListDirectDescendList(java.lang.String PDId) throws PDException
PDId
- Id of the parent folderPDException
- in any errorpublic Record Load(java.lang.String Ident) throws PDException
Load
in class ObjPD
Ident
- Identifier of folder to loadPDException
- In any errorpublic Record LoadRefresh(java.lang.String Ident) throws PDException
Ident
- Identifier of folder to loadPDException
- In any errorpublic Record LoadFull(java.lang.String Ident) throws PDException
Ident
- Identifier (PDId) of FolderPDException
- In any errorpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String CreateChild(java.lang.String FoldName) throws PDException
FoldName
- Name of the new folderPDException
- In any errorpublic java.lang.String GetIdChild(java.lang.String ParentId, java.lang.String FoldName) throws PDException
ParentId
- id of parent folderFoldName
- name of child folderPDException
- if the folder dosen't exist or the user it'snt allowedpublic java.lang.String getIdPath(java.lang.String FoldName) throws PDException
FoldName
- name of child folderPDException
- if the folder dosen't exist or the user it'snt allowedpublic java.lang.String getPathId(java.lang.String Id) throws PDException
Id
- PDID of child folderPDException
- if the folder doesn't exist or the user it'snt allowedpublic java.util.Vector<Record> SearchV(java.lang.String FolderType, Conditions AttrConds, boolean SubTypes, boolean SubFolders, java.lang.String IdActFold, java.util.Vector Ord) throws PDException
FolderType
- Type of folder to search. Can return folders of subtype.AttrConds
- Conditions over the fields ofthe FolderTypeSubTypes
- if true, returns results of the indicated type AND susbtipesSubFolders
- if true seach in actual folder AND subfolders, if false, serach in ALL the structureIdActFold
- Folder to start the search. if null, start in the root levelOrd
- Vector of String with the ascending orderPDException
- when occurs any problempublic Cursor Search(java.lang.String FolderType, Conditions AttrConds, boolean SubTypes, boolean SubFolders, java.lang.String IdActFold, java.util.Vector Ord) throws PDException
FolderType
- Type of folder to search. Can return folders of subtype.AttrConds
- Conditions over the fields ofthe FolderTypeSubTypes
- if true, returns results of the indicated type AND susbtipesSubFolders
- if true seach in actual folder AND subfolders, if false, serach in ALL the structureIdActFold
- Folder to start the search. if null, start in the root levelOrd
- Vector of String with the ascending orderPDException
- when occurs any problempublic PDFolders NextFold(Cursor Res) throws PDException
Res
- Cursor created with method Search and serevral parametersPDException
- when occurs any problempublic PDFolders ImportXMLNode(org.w3c.dom.Node OPDObject, java.lang.String ParentFolderId, boolean MaintainId) throws PDException
OPDObject
- XMLNode to processParentFolderId
- OPD destination folderMaintainId
- When true, the Original Id is maintained, else a new one is assignedPDException
- In any errorpublic PDFolders ProcessXML(java.io.File XMLFile, java.lang.String ParentFolderId) throws PDException
XMLFile
- File to processParentFolderId
- Flder where the new Folde()s) will be createdPDException
- In any errorpublic java.util.ArrayList OrderedGrandParents(java.lang.String Id) throws PDException
Id
- Identifier of folderPDException
- In any errorpublic void ExportDocs(java.lang.String Path) throws PDException
Path
- OS path to export toPDException
- In any errorpublic boolean IsUnder(java.lang.String ParentId) throws PDException
ParentId
- PDID of poytential ancestorPDException
- in any errorpublic java.lang.String toHtml() throws PDException
PDException
- in any errorpublic Cursor getAll() throws PDException
getAll
in class ObjPD
PDException
- Alwayspublic boolean Move(java.lang.String NewParentId) throws PDExceptionFunc
NewParentId
- Id of the target folderPDExceptionFunc
- In any error