org.chromattic.api.format
Interface ObjectFormatter

All Known Implementing Classes:
DefaultObjectFormatter

public interface ObjectFormatter

The object formatter defines an interface used to filter the naming of the jcr nodes and properties.

Version:
$Revision$
Author:
Julien Viet

Method Summary
 java.lang.String decodeNodeName(FormatterContext context, java.lang.String internalName)
          Converts a jcr node name to an entity name.
 java.lang.String encodeNodeName(FormatterContext context, java.lang.String externalName)
          Converts an entity name to a jcr node name.
 

Method Detail

decodeNodeName

java.lang.String decodeNodeName(FormatterContext context,
                                java.lang.String internalName)
Converts a jcr node name to an entity name.

Parameters:
context - the context
internalName - the jcr node name
Returns:
the entity name

encodeNodeName

java.lang.String encodeNodeName(FormatterContext context,
                                java.lang.String externalName)
                                throws java.lang.IllegalArgumentException,
                                       java.lang.NullPointerException
Converts an entity name to a jcr node name.

Parameters:
context - the context
externalName - the entity name
Returns:
the jcr node name
Throws:
java.lang.IllegalArgumentException - if the name cannot be converted due to its nature
java.lang.NullPointerException - if the name would convert to a value meaning nullity


Copyright © 2010 eXo Platform SAS. All Rights Reserved.