org.apache.chemistry.opencmis.jcr
Class PropertyHelper

java.lang.Object
  extended by org.apache.chemistry.opencmis.jcr.PropertyHelper

public final class PropertyHelper
extends Object

Helper class with utility functions for handling Properties.


Method Summary
static PropertyData<?> getDefaultValue(PropertyDefinition<?> propDef)
          Determine the default property data value for a given property definition.
static String getStringProperty(Properties properties, String name)
          Retrieve a string value.
static String getTypeId(Properties properties)
          Gets the type id from a set of properties.
static boolean isPropertyEmpty(PropertyData<?> prop)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStringProperty

public static String getStringProperty(Properties properties,
                                       String name)
Retrieve a string value.

Parameters:
properties -
name - the name of the value to retrieve
Returns:
the first value of the given name or null if either these are no string properties or no property of name exists.

getTypeId

public static String getTypeId(Properties properties)
Gets the type id from a set of properties.


isPropertyEmpty

public static boolean isPropertyEmpty(PropertyData<?> prop)
Parameters:
prop -
Returns:
true iff prop denotes an empty property data value

getDefaultValue

public static PropertyData<?> getDefaultValue(PropertyDefinition<?> propDef)
Determine the default property data value for a given property definition.

Parameters:
propDef -
Returns:
Throws:
CmisRuntimeException - if propDef is invalid or unknown.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.