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
 String decodeNodeName(FormatterContext context, String internalName)
          Converts a jcr node name to an entity name.
 String encodeNodeName(FormatterContext context, String externalName)
          Converts an entity name to a jcr node name.
 

Method Detail

decodeNodeName

String decodeNodeName(FormatterContext context,
                      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

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

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


Copyright © 2010 eXo Platform SAS. All Rights Reserved.