com.gentics.api.lib.resolving
Class SetHelper

java.lang.Object
  extended by com.gentics.api.lib.resolving.SetHelper

public class SetHelper
extends java.lang.Object

Helper class to execute assignment commands on Resolvable objects or Maps.

Author:
norbert

Constructor Summary
SetHelper()
          Create an instance of the SetHelper.
 
Method Summary
 void addBaseObject(java.lang.String objectName, java.lang.Object object)
          Add a new base object to the SetHelper.
protected  void addToProperty(java.lang.String propertyPath, java.lang.Object value)
          add the given value to the multivalue property
 boolean executeCommand(java.lang.String setCommand)
          Parse and execute the given setCommand
protected  java.lang.Object getProperty(java.lang.String propertypath)
          Get the property by its path.
protected  void setProperty(java.lang.String propertyPath, java.lang.Object value)
          set the property with given path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetHelper

public SetHelper()
Create an instance of the SetHelper.

Method Detail

addBaseObject

public void addBaseObject(java.lang.String objectName,
                          java.lang.Object object)
Add a new base object to the SetHelper. The given object may be a Resolvable or a Map.

Parameters:
objectName - name of the base object
object - base object (Resolvable or Map)

executeCommand

public boolean executeCommand(java.lang.String setCommand)
Parse and execute the given setCommand

Parameters:
setCommand - a set command of the form portal.blablabla.whatever = view.blablabla
Returns:
true when the assignment could be processed, false if not

getProperty

protected java.lang.Object getProperty(java.lang.String propertypath)
Get the property by its path.

Parameters:
propertypath - path to the property
Returns:
value of the property or null, if not set

setProperty

protected void setProperty(java.lang.String propertyPath,
                           java.lang.Object value)
set the property with given path

Parameters:
propertyPath - path to the property to set
value - new value of the property

addToProperty

protected void addToProperty(java.lang.String propertyPath,
                             java.lang.Object value)
add the given value to the multivalue property

Parameters:
propertyPath - path to the multivalue property
value - new value to add to the multivalue property


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.