com.gentics.api.portalnode.portal
Class PortalPropertySetter

java.lang.Object
  extended by com.gentics.api.portalnode.portal.PortalPropertySetter

public final class PortalPropertySetter
extends java.lang.Object

Final helper class to get/set portal properties identified by portal property paths.


Method Summary
static java.lang.Object get(java.lang.String propertyPath)
          Get a portal property via the provided path
static java.lang.Object getUnchecked(java.lang.String propertyPath)
          Get a portal property via the provided path.
static void set(java.lang.String propertyPath, java.lang.Object value)
          Set the portal property identified via propertyPath to the provided value
static void setUnchecked(java.lang.String propertyPath, java.lang.Object value)
          Set the portal property identified via propertyPath to the provided value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static java.lang.Object get(java.lang.String propertyPath)
                            throws UnknownPropertyException
Get a portal property via the provided path

Parameters:
propertyPath - path to identify the property
Returns:
the propertie's value
Throws:
UnknownPropertyException - if the property path leads straight to nowhere

getUnchecked

public static java.lang.Object getUnchecked(java.lang.String propertyPath)
Get a portal property via the provided path. Unlike get(String), this method will not throw an exception, when the given path does not lead to a known property, but simply returns null in such cases.

Parameters:
propertyPath - path to identify the property
Returns:
the properties value or null

set

public static void set(java.lang.String propertyPath,
                       java.lang.Object value)
                throws InsufficientPrivilegesException,
                       UnknownPropertyException
Set the portal property identified via propertyPath to the provided value

Parameters:
propertyPath - to identify the portal property
value - to be set
Throws:
InsufficientPrivilegesException - if property may not be set due to privilege restrictions
UnknownPropertyException - if the property is not known

setUnchecked

public static void setUnchecked(java.lang.String propertyPath,
                                java.lang.Object value)
Set the portal property identified via propertyPath to the provided value. Unlike set(String, Object), this method will not throw an exception when the property is not known or the user may not modify the properties value.

Parameters:
propertyPath - to identify the portal property
value - to be set


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.