org.apache.jackrabbit.jcr2spi.operation
Class AddProperty

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
      extended by org.apache.jackrabbit.jcr2spi.operation.AddProperty
All Implemented Interfaces:
Operation

public class AddProperty
extends AbstractOperation

AddProperty...


Field Summary
 
Fields inherited from class org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
status
 
Fields inherited from interface org.apache.jackrabbit.jcr2spi.operation.Operation
STATUS_PENDING, STATUS_PERSISTED, STATUS_UNDO
 
Method Summary
 void accept(OperationVisitor visitor)
          Calls the appropriate visit method on visitor based on the type of this operation.
static Operation create(NodeState parentState, Name propName, int propertyType, QPropertyDefinition def, QValue[] values)
           
 QPropertyDefinition getDefinition()
           
 NodeId getParentId()
           
 NodeState getParentState()
           
 Name getPropertyName()
           
 int getPropertyType()
           
 QValue[] getValues()
           
 boolean isMultiValued()
           
 void persisted()
          Informs this Operation that it has been successfully executed.
 void undo()
          Revert changes made by this operation.
 
Methods inherited from class org.apache.jackrabbit.jcr2spi.operation.AbstractOperation
addAffectedItemState, assertChildNodeEntries, getAffectedItemStates, getName, getNodeState, getStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

accept

public void accept(OperationVisitor visitor)
            throws ValueFormatException,
                   LockException,
                   ConstraintViolationException,
                   AccessDeniedException,
                   ItemExistsException,
                   UnsupportedRepositoryOperationException,
                   VersionException,
                   RepositoryException
Description copied from interface: Operation
Calls the appropriate visit method on visitor based on the type of this operation.

Parameters:
visitor -
Throws:
ValueFormatException
LockException
ConstraintViolationException
AccessDeniedException
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
RepositoryException

persisted

public void persisted()
               throws RepositoryException
Description copied from interface: Operation
Informs this Operation that it has been successfully executed.

Throws:
RepositoryException
See Also:
Operation.persisted()

undo

public void undo()
          throws RepositoryException
Description copied from interface: Operation
Revert changes made by this operation.

Specified by:
undo in interface Operation
Overrides:
undo in class AbstractOperation
Throws:
RepositoryException
See Also:
Operation.undo()

getParentId

public NodeId getParentId()

getParentState

public NodeState getParentState()

getPropertyName

public Name getPropertyName()

getPropertyType

public int getPropertyType()

getValues

public QValue[] getValues()

isMultiValued

public boolean isMultiValued()

getDefinition

public QPropertyDefinition getDefinition()

create

public static Operation create(NodeState parentState,
                               Name propName,
                               int propertyType,
                               QPropertyDefinition def,
                               QValue[] values)
                        throws RepositoryException
Parameters:
parentState -
propName -
propertyType -
def -
values -
Returns:
Throws:
RepositoryException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.