COAR  1.0
COAR - DMS system
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
foldermanagement.h
Go to the documentation of this file.
1 
2 #ifndef FOLDERMANAGEMENT_H
3 #define FOLDERMANAGEMENT_H
4 
5 #include "headers.hh"
6 #include "coar.h"
7 #include "folderstr.h"
8 #include "contentlist.h"
9 
10 #define FLD_ACTUAL 0
11 
12 class document;
13 class folder;
14 class fileableObject;
15 
22 {
23 public:
26  folderManagement(coar* _coarinstance);
27 
28 
43  wstring getPathByFolderId(fldid_t folderid);
44 
59  wstring getPathByDocId(docid_t docid);
60 
75  wstring getPathByEntryId(fileableobject_id eid);
76 
77 
90  bool isPathCorrect(std::wstring path);
91 
106  static bool isRelativePath(std::wstring path);
107 
121  int dumpFolderTree(fldid_t rootid, bool recursive = true, bool includingDocs = true);
122 
142  folder* getFolderByPath(wstring path, fldid_t from = FLDID_UNDEF);
143 
163  vector<document*> getDocumentsByPath(wstring path, fldid_t from = FLDID_UNDEF);
164 
184  vector<fileableObject*> getObjectsByPath(wstring path, fldid_t from = FLDID_UNDEF);
185 
186 
208  int getFolderIdByPath(wstring path, fldid_t& fldid, fldid_t from = FLDID_UNDEF);
209 
231  int getDocumentIdsByPath(wstring path, vector<docid_t>& docids, fldid_t from = FLDID_UNDEF);
232 
257  int getObjectIdsByPath(wstring path, vector<fileableobject_id>& eids, int types, fldid_t from = FLDID_UNDEF);
258 
261  bool isFolderUnderSubtree(fldid_t fldid, fldid_t rootid);
262 
263 
266  wstring generateUniqueName(wstring oldname);
267 
268 
271  bool folderExists(fldid_t fldid);
272 private:
273  coar* coarinstance;
274 };
275 
276 
277 #endif