org.chromattic.api.format
Class DefaultObjectFormatter

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

public class DefaultObjectFormatter
extends java.lang.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
 java.lang.String decodeNodeName(FormatterContext context, java.lang.String internalName)
          Converts a jcr node name to an entity name.
 java.lang.String decodePropertyName(FormatterContext context, java.lang.String internalName)
           
 java.lang.String encodeNodeName(FormatterContext context, java.lang.String externalName)
          Converts an entity name to a jcr node name.
 java.lang.String encodePropertyName(FormatterContext context, java.lang.String externalName)
           
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 java.lang.String decodeNodeName(FormatterContext context,
                                       java.lang.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 java.lang.String encodeNodeName(FormatterContext context,
                                       java.lang.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 java.lang.String decodePropertyName(FormatterContext context,
                                           java.lang.String internalName)

encodePropertyName

public java.lang.String encodePropertyName(FormatterContext context,
                                           java.lang.String externalName)


Copyright © 2013 eXo Platform SAS. All Rights Reserved.