spcp7.imagegallery.impl.alfresco.utils
Class AlfrescoUtils

java.lang.Object
  extended by spcp7.imagegallery.impl.alfresco.utils.AlfrescoUtils

public class AlfrescoUtils
extends java.lang.Object

Author:
Phillip Merensky

Constructor Summary
AlfrescoUtils()
           
 
Method Summary
 java.lang.String encodeAlfrescoAbbreviatedPathISO9075(java.lang.String path)
          This method encodes the elements of an alfresco path conforming to ISO9075.encode(String).
 java.lang.String normalizePathNamespace(java.lang.String inputPath, java.util.Map<java.lang.String,PropertyModelFace> properties)
          This method replaces the full path of alfresco to the short one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlfrescoUtils

public AlfrescoUtils()
Method Detail

normalizePathNamespace

public java.lang.String normalizePathNamespace(java.lang.String inputPath,
                                               java.util.Map<java.lang.String,PropertyModelFace> properties)
This method replaces the full path of alfresco to the short one. The replacements can be defined in AlfrescoDefaultProperties.ALFRESCO_FULL_APP_NAMESPACE_REPLACEMENT and AlfrescoDefaultProperties.ALFRESCO_FULL_CM_NAMESPACE_REPLACEMENT. The regex replace pattern is defined in AlfrescoDefaultProperties.ALFRESCO_SHORTEN_APP_NAMESPACE_REGEX and AlfrescoDefaultProperties.ALFRESCO_SHORTEN_CM_NAMESPACE_REGEX.

Parameters:
inputPath -
Returns:
The shortened path or the input path if the properties ALFRESCO_FULL_APP_NAMESPACE_REPLACEMENT and ALFRESCO_FULL_CM_NAMESPACE_REPLACEMENT could not be found

encodeAlfrescoAbbreviatedPathISO9075

public java.lang.String encodeAlfrescoAbbreviatedPathISO9075(java.lang.String path)
This method encodes the elements of an alfresco path conforming to ISO9075.encode(String). Elements of a path are only names. That is no slashes or content prefixes like (app:). Slashes and content prefixes remain unchanged.

Parameters:
path -
Returns:
The path with ISO9075 encoded elements.


Copyright © 2008. All Rights Reserved.