ccc.api.core
Interface Templates

All Known Implementing Classes:
TemplatesEJB, TemplatesImpl

public interface Templates

API for manipulating templates.

Author:
Civic Computing Ltd.

Field Summary
static java.lang.String NAME
          NAME : String.
 
Method Summary
 ResourceSummary create(Template template)
          Create a new template in CCC.
 PagedCollection<Template> query(int pageNo, int pageSize)
          List all the templates currently available in CCC.
 Template retrieve(java.util.UUID templateId)
          Retrieve the delta for a template.
 Template retrieveRevision(java.util.UUID templateId, int revision)
          Retrieve a template revision.
 java.lang.Boolean templateNameExists(java.lang.String templateName)
          Returns true if template name exists in the template folder.
 void update(java.util.UUID templateId, Template delta)
          Update the specified template on the server.
 

Field Detail

NAME

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

See Also:
Constant Field Values
Method Detail

query

PagedCollection<Template> query(int pageNo,
                                int pageSize)
List all the templates currently available in CCC.

Parameters:
pageNo - The page of results to return.
pageSize - The number of results in a page.
Returns:
A list of templates.

templateNameExists

java.lang.Boolean templateNameExists(java.lang.String templateName)
Returns true if template name exists in the template folder.

Parameters:
templateName - The name to look up.
Returns:
True if name exists.

retrieve

Template retrieve(java.util.UUID templateId)
Retrieve the delta for a template.

Parameters:
templateId - The template's id.
Returns:
The corresponding delta.

update

void update(java.util.UUID templateId,
            Template delta)
Update the specified template on the server.

Parameters:
templateId - The id of the template to update.
delta - The changes to apply.

create

ResourceSummary create(Template template)
Create a new template in CCC.

Parameters:
template - The template's details.
Returns:
A resource summary describing the new template.

retrieveRevision

Template retrieveRevision(java.util.UUID templateId,
                          int revision)
Retrieve a template revision.

Parameters:
templateId - The template's id.
revision - The revision to fetch.
Returns:
The corresponding delta.


Copyright © 2010. All Rights Reserved.