org.chromattic.api.format
Class DefaultObjectFormatter

java.lang.Object
  extended by org.chromattic.api.format.DefaultObjectFormatter
All Implemented Interfaces:
ObjectFormatter

public class DefaultObjectFormatter
extends Object
implements ObjectFormatter

Defines the default codec format that only performs validation of JCR names.

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
DefaultObjectFormatter()
           
 
Method Summary
 String decodeNodeName(FormatterContext context, String internalName)
          Converts a jcr node name to an entity name.
 String decodePropertyName(FormatterContext context, String internalName)
          Converts a jcr property name to an entity property name.
 String encodeNodeName(FormatterContext context, String externalName)
          Converts an entity name to a jcr node name.
 String encodePropertyName(FormatterContext context, String externalName)
          Converts an entity property name to a jcr property name.
static DefaultObjectFormatter getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultObjectFormatter

public DefaultObjectFormatter()
Method Detail

getInstance

public static DefaultObjectFormatter getInstance()

decodeNodeName

public String decodeNodeName(FormatterContext context,
                             String internalName)
Description copied from interface: ObjectFormatter
Converts a jcr node name to an entity name.

Specified by:
decodeNodeName in interface ObjectFormatter
Parameters:
context - the context
internalName - the jcr node name
Returns:
the entity name

encodeNodeName

public String encodeNodeName(FormatterContext context,
                             String externalName)
Description copied from interface: ObjectFormatter
Converts an entity name to a jcr node name.

Specified by:
encodeNodeName in interface ObjectFormatter
Parameters:
context - the context
externalName - the entity name
Returns:
the jcr node name

decodePropertyName

public String decodePropertyName(FormatterContext context,
                                 String internalName)
Description copied from interface: ObjectFormatter
Converts a jcr property name to an entity property name.

Specified by:
decodePropertyName in interface ObjectFormatter
Parameters:
context - the context
internalName - the jcr property name
Returns:
the entity property name

encodePropertyName

public String encodePropertyName(FormatterContext context,
                                 String externalName)
Description copied from interface: ObjectFormatter
Converts an entity property name to a jcr property name.

Specified by:
encodePropertyName in interface ObjectFormatter
Parameters:
context - the context
externalName - the entity property name
Returns:
the jcr property name


Copyright © 2010 eXo Platform SAS. All Rights Reserved.