ccc.api.core
Interface Folders

All Known Implementing Classes:
FoldersEJB, FoldersImpl

public interface Folders

Basic API for manipulating folders.

Author:
Civic Computing Ltd.

Field Summary
static java.lang.String NAME
          NAME : String.
 
Method Summary
 ResourceSummary create(Folder folder)
          Create a folder with the specified name.
 ResourceSummary createFolder(java.util.UUID parentId, java.lang.String name, java.lang.String title, boolean publish)
          Deprecated. 
 ResourceSummary createRoot(java.lang.String name)
          Create a root folder with the specified name.
 PagedCollection<ResourceSummary> getAccessibleChildren(java.util.UUID folderId)
          List all of the children of the specified folder which are accessible to current user.
 java.lang.Boolean nameExistsInFolder(java.util.UUID folderId, java.lang.String name)
          Query whether given folder has a resource with given name.
 PagedCollection<ResourceSummary> roots()
          List the root folders available.
 void update(java.util.UUID folderId, Folder delta)
          Update the specified folder.
 

Field Detail

NAME

static final java.lang.String NAME
NAME : String.

See Also:
Constant Field Values
Method Detail

getAccessibleChildren

PagedCollection<ResourceSummary> getAccessibleChildren(java.util.UUID folderId)
List all of the children of the specified folder which are accessible to current user.

Parameters:
folderId - The folder.
Returns:
The folder's of children.

nameExistsInFolder

java.lang.Boolean nameExistsInFolder(java.util.UUID folderId,
                                     java.lang.String name)
Query whether given folder has a resource with given name.

Parameters:
folderId - The id of the folder to check.
name - The name of the resource.
Returns:
Returns true in case folder has a resource with given name, false otherwise.

roots

PagedCollection<ResourceSummary> roots()
List the root folders available.

Returns:
A collection of resource summaries - one for each root folder.

create

ResourceSummary create(Folder folder)
Create a folder with the specified name.

Parameters:
folder - Details of the new folder.
Returns:
A resource summary describing the new folder.

update

void update(java.util.UUID folderId,
            Folder delta)
Update the specified folder.

Parameters:
folderId - The id of the folder to update.
delta - The updated details of the folder.

createFolder

@Deprecated
ResourceSummary createFolder(java.util.UUID parentId,
                                        java.lang.String name,
                                        java.lang.String title,
                                        boolean publish)
Deprecated. 

Create a folder with the specified name and title.

Parameters:
parentId - The folder in which the new folder should be created.
name - The name of the new folder.
title - The title of the folder.
publish - True if the title should be published, false otherwise.
Returns:
A resource summary describing the new folder.

createRoot

ResourceSummary createRoot(java.lang.String name)
Create a root folder with the specified name.

Parameters:
name - The name of the root folder.
Returns:
A resource summary describing the new root.


Copyright © 2010. All Rights Reserved.