Content Web Service Future Additions

From AlfrescoWiki

Jump to: navigation, search

Back to Content Web Service.

Proposed future additions to the content web service

Contents

[edit] Data Types

[edit] NativeTypeEnum

A list of native type supported by the native type template model value type.

  • TEXT - a text value
  • DATE - a date value
  • INT - a integer number value
  • ... and so on

[edit] NativeTypeTemplateValue

  • string name - the name of the template value
  • NativeTypeEnum type - the type of the value
  • string value - the value

[edit] ReferenceTemplateValue

  • string name - the name of the template value
  • Reference reference - the reference


[edit] PredicateTemplateValue

  • string name - the name of the template value
  • Predicate predicate - the predicate

[edit] TemplateModel

[edit] Methods

[edit] transform

Transform the content from one mime type to another.

Content transform(Content source, Content destination)

Parameters:

  • source - the content used as the source of the transformation
  • destination - the content that is the destination of the transformation

Return:

  • the transformed content

[edit] isTransformable

Determines whether a transformation exists between two mimetypes.

boolean isTransformable(string sourceMimeType, string destinationMimeType)

Parameters:

  • sourceMimeType - the source mime type
  • destinationMimeType = the destination mime type

Return:

  • true if a transformation exists between the two mime types, false otherwise

[edit] processTemplateFromContent

Process a template that is stored as Content in the repository with the provided context.

string processTemplateFromContent(string templateEngine, Content template, TemplateModel templateModel)

Parameters:

  • templateEngine - the name of the template engine to use to process the template
  • template - content referencing the template stored in the repository
  • templateModel - provides the model that will be provided to the template during processing

Return:

  • the result of processing the template

[edit] processTemplateFromString

Precces a template that is passed as a string with the provided context.

string processTemplateFromString(string templateEngine, string template, TemplateModel templateModel)

Parameters:

  • templateEngine - the name of the template engine to use to process the template
  • template - string representation of the template
  • templateModel - provides the model that will be provided to the template during processing

Return:

  • the result of processing the template