use of org.apache.jackrabbit.jcr2spi.operation.IgnoreOperation in project jackrabbit by apache.
the class SessionItemStateManager method visit.
/**
* @see OperationVisitor#visit(AddProperty)
*/
public void visit(AddProperty operation) throws ValueFormatException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException {
NodeState parent = operation.getParentState();
Name propertyName = operation.getPropertyName();
QPropertyDefinition pDef = operation.getDefinition();
int targetType = pDef.getRequiredType();
if (targetType == PropertyType.UNDEFINED) {
targetType = operation.getPropertyType();
if (targetType == PropertyType.UNDEFINED) {
targetType = PropertyType.STRING;
}
}
addPropertyState(parent, propertyName, targetType, operation.getValues(), pDef, operation.getOptions());
if (!(operation instanceof IgnoreOperation)) {
transientStateMgr.addOperation(operation);
}
}
use of org.apache.jackrabbit.jcr2spi.operation.IgnoreOperation in project jackrabbit by apache.
the class SessionItemStateManager method visit.
// ---------------------------------------------------< OperationVisitor >---
/**
* @see OperationVisitor#visit(AddNode)
*/
public void visit(AddNode operation) throws LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException, RepositoryException {
NodeState parent = operation.getParentState();
ItemDefinitionProvider defProvider = mgrProvider.getItemDefinitionProvider();
QNodeDefinition def = defProvider.getQNodeDefinition(parent.getAllNodeTypeNames(), operation.getNodeName(), operation.getNodeTypeName());
List<ItemState> newStates = addNodeState(parent, operation.getNodeName(), operation.getNodeTypeName(), operation.getUuid(), def, operation.getOptions());
operation.addedState(newStates);
if (!(operation instanceof IgnoreOperation)) {
transientStateMgr.addOperation(operation);
}
}
Aggregations