org.apache.sling.servlets.post.impl.helper
Class SlingPropertyValueHandler

java.lang.Object
  extended by org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler

public class SlingPropertyValueHandler
extends Object

Sets a Property on the given Node, in some cases with a specific type and value. For example, "lastModified" with an empty value is stored as the current Date.


Constructor Summary
SlingPropertyValueHandler(DateParser dateParser, ReferenceParser referenceParser, List<Modification> changes)
          Constructs a propert value handler
 
Method Summary
 void setProperty(javax.jcr.Node parent, RequestProperty prop)
          Set property on given node, with some automatic values when user provides the field name but no value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlingPropertyValueHandler

public SlingPropertyValueHandler(DateParser dateParser,
                                 ReferenceParser referenceParser,
                                 List<Modification> changes)
Constructs a propert value handler

Method Detail

setProperty

public void setProperty(javax.jcr.Node parent,
                        RequestProperty prop)
                 throws javax.jcr.RepositoryException
Set property on given node, with some automatic values when user provides the field name but no value. html example for testing: <input type="hidden" name="created"/> <input type="hidden" name="lastModified"/> <input type="hidden" name="createdBy" /> <input type="hidden" name="lastModifiedBy"/>

Parameters:
parent - the parent node
prop - the request property
Throws:
javax.jcr.RepositoryException - if a repository error occurs


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.