public class EntryControl
extends java.lang.Object
构造器和说明 |
---|
EntryControl() |
限定符和类型 | 方法和说明 |
---|---|
void |
checkSaveOrUpdateEntryPrivilege(BaseEntry entry,
long userId)
检查是否有保存/更新对象的权限
|
boolean |
deleteEntry(Entry entry)
删除某个entry
|
boolean |
deleteEntry(int type,
long id)
删除entry
|
Entry |
getEntry(int type,
long entryId)
根据entry类型和id获取entry
|
EntryTreeFolderNode |
getFolderNode(long folderId)
根据文件夹id获取 EntryTreeFolderNode
|
static EntryControl |
getInstance()
获取唯一实例化对象
|
EntryTreeFolderNode |
getRootNode()
获取root
|
JSONArray |
getRootShowFolder(long userid)
获取root显示的文件夹
|
boolean |
saveOrUpdateEntry(Entry entry)
插入或更新entry
|
void |
sortEntry(long id,
int sortIndex,
int entryType)
在所有当前目录节点(不分类型)间排序排序非文件entry
|
void |
sortFolderEntry(long id,
int sortIndex)
排序文件夹entry
|
boolean |
updateEntry(Entry entry)
插入或更新Entry,成功后重新初始化缓存
|
public static EntryControl getInstance()
public Entry getEntry(int type, long entryId)
type
- entry类型entryId
- idpublic EntryTreeFolderNode getRootNode()
public EntryTreeFolderNode getFolderNode(long folderId)
folderId
- idpublic boolean saveOrUpdateEntry(Entry entry) throws java.lang.Exception
entry
- entryjava.lang.Exception
- epublic boolean updateEntry(Entry entry) throws java.lang.Exception
entry
- FolderEntryjava.lang.Exception
- epublic void checkSaveOrUpdateEntryPrivilege(BaseEntry entry, long userId) throws java.lang.Exception
entry
- 对象userId
- 用户idjava.lang.Exception
public boolean deleteEntry(Entry entry) throws java.lang.Exception
entry
- 文件entryjava.lang.Exception
public boolean deleteEntry(int type, long id) throws java.lang.Exception
type
- entry类型id
- 文件idjava.lang.Exception
public void sortEntry(long id, int sortIndex, int entryType) throws java.lang.Exception
id
- idsortIndex
- 顺序entryType
- 类型java.lang.Exception
public void sortFolderEntry(long id, int sortIndex) throws java.lang.Exception
id
- idsortIndex
- 次序索引值java.lang.Exception
- epublic JSONArray getRootShowFolder(long userid) throws java.lang.Exception
userid
- 用户id 用于判断权限java.lang.Exception