ccc.api.core
Interface Files

All Known Implementing Classes:
FilesEJB, FilesImpl

public interface Files

API for manipulating files.

Author:
Civic Computing Ltd.

Field Summary
static java.lang.String NAME
          NAME : String.
 
Method Summary
 ResourceSummary create(File file)
          Create a new CCC file.
 ResourceSummary createTextFile(File textFile)
          Deprecated. 
 PagedCollection<File> getPagedImages(java.util.UUID folderId, int pageNo, int pageSize)
          List all images of the given folder id.
 File retrieve(java.util.UUID fileId)
          Get the representation of an existing CCC file.
 void retrieve(java.util.UUID file, StreamAction action)
          Process the contents of a file with an action.
 void retrieveRevision(java.util.UUID file, int revision, StreamAction action)
          Process the contents of a file revision with an action.
 void retrieveWorkingCopy(java.util.UUID file, StreamAction action)
          Process the contents of a file's working copy with an action.
 void update(java.util.UUID id, File file)
          Update an existing CCC file.
 ResourceSummary updateFile(java.util.UUID fileId, File file)
          Update an existing CCC file.
 

Field Detail

NAME

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

See Also:
Constant Field Values
Method Detail

getPagedImages

PagedCollection<File> getPagedImages(java.util.UUID folderId,
                                     int pageNo,
                                     int pageSize)
List all images of the given folder id.

Parameters:
folderId - The id of the folder.
pageNo - The page to display.
pageSize - The number of results per page.
Returns:
The list of images.

update

void update(java.util.UUID id,
            File file)
Update an existing CCC file.

Parameters:
id - The ID of the file to update.
file - The new file representation.

retrieve

File retrieve(java.util.UUID fileId)
Get the representation of an existing CCC file.

Parameters:
fileId - The ID of the file to get.
Returns:
The file for the specified ID.

createTextFile

@Deprecated
ResourceSummary createTextFile(File textFile)
Deprecated. 

Create a new text file in CCC.

Parameters:
textFile - The textFile details.
Returns:
A resource summary describing the new text file.

create

ResourceSummary create(File file)
Create a new CCC file.

Parameters:
file - The file to create.
Returns:
A summary of the newly created file.

updateFile

ResourceSummary updateFile(java.util.UUID fileId,
                           File file)
Update an existing CCC file.

Parameters:
fileId - The id of the file to update.
file - The changes to apply.
Returns:
A summary of the updated file.

retrieve

void retrieve(java.util.UUID file,
              StreamAction action)
Process the contents of a file with an action.

Parameters:
file - The file's ID.
action - The action to perform.

retrieveWorkingCopy

void retrieveWorkingCopy(java.util.UUID file,
                         StreamAction action)
Process the contents of a file's working copy with an action.

Parameters:
file - The file's ID.
action - The action to perform.

retrieveRevision

void retrieveRevision(java.util.UUID file,
                      int revision,
                      StreamAction action)
Process the contents of a file revision with an action.

Parameters:
file - The file's ID.
revision - The file revision to retrieve.
action - The action to perform.


Copyright © 2010. All Rights Reserved.