Package org.apache.jackrabbit.jcr2spi.operation

Examples of org.apache.jackrabbit.jcr2spi.operation.SetPropertyValue


     */
    public void complete(Operation operation) throws RepositoryException {
        if (!(operation instanceof SetPropertyValue)) {
            throw new IllegalArgumentException();
        }
        SetPropertyValue op = (SetPropertyValue) operation;
        if (op.getPropertyState().getHierarchyEntry() != this) {
            throw new IllegalArgumentException();
        }
        switch (operation.getStatus()) {
            case Operation.STATUS_PERSISTED:
                // Property can only be the change log target if it was existing and has
                // been modified. This includes the case where a property was changed and
                // then removed by removing its parent. See JCR-2462.
                // Removal, add and implicit modification of protected
                // properties must be persisted by save on parent.
                PropertyState state = op.getPropertyState();
                if (state.getStatus() != Status.REMOVED) {
                    state.setStatus(Status.EXISTING);
                }
                break;
            case Operation.STATUS_UNDO:
View Full Code Here


     */
    public void complete(Operation operation) throws RepositoryException {
        if (!(operation instanceof SetPropertyValue)) {
            throw new IllegalArgumentException();
        }
        SetPropertyValue op = (SetPropertyValue) operation;
        if (op.getPropertyState().getHierarchyEntry() != this) {
            throw new IllegalArgumentException();
        }
        switch (operation.getStatus()) {
            case Operation.STATUS_PERSISTED:
                /*
                NOTE: Property can only be the changelog target, if it was
                      existing and has been modified. removal, add and implicit modification
                      of protected properties must be persisted by save on parent.
                */
                op.getPropertyState().setStatus(Status.EXISTING);
                break;
            case Operation.STATUS_UNDO:
                revert();
                break;
            default:
View Full Code Here

     */
    public void complete(Operation operation) throws RepositoryException {
        if (!(operation instanceof SetPropertyValue)) {
            throw new IllegalArgumentException();
        }
        SetPropertyValue op = (SetPropertyValue) operation;
        if (op.getPropertyState().getHierarchyEntry() != this) {
            throw new IllegalArgumentException();
        }
        switch (operation.getStatus()) {
            case Operation.STATUS_PERSISTED:
                // Property can only be the change log target if it was existing
                // and has been modified. This includes the case where a property
                // was changed and then removed by removing its parent. See JCR-2462.
                // Removal, add and implicit modification of protected
                // properties must be persisted by save on parent.
                PropertyState state = op.getPropertyState();
                if (state.getStatus() != Status.REMOVED) {
                    state.setStatus(Status.EXISTING);
                }
                break;
            case Operation.STATUS_UNDO:
View Full Code Here

     */
    public void complete(Operation operation) throws RepositoryException {
        if (!(operation instanceof SetPropertyValue)) {
            throw new IllegalArgumentException();
        }
        SetPropertyValue op = (SetPropertyValue) operation;
        if (op.getPropertyState().getHierarchyEntry() != this) {
            throw new IllegalArgumentException();
        }
        switch (operation.getStatus()) {
            case Operation.STATUS_PERSISTED:
                // Property can only be the change log target if it was existing
                // and has been modified. This includes the case where a property
                // was changed and then removed by removing its parent. See JCR-2462.
                // Removal, add and implicit modification of protected
                // properties must be persisted by save on parent.
                PropertyState state = op.getPropertyState();
                if (state.getStatus() != Status.REMOVED) {
                    state.setStatus(Status.EXISTING);
                }
                break;
            case Operation.STATUS_UNDO:
View Full Code Here

     */
    public void complete(Operation operation) throws RepositoryException {
        if (!(operation instanceof SetPropertyValue)) {
            throw new IllegalArgumentException();
        }
        SetPropertyValue op = (SetPropertyValue) operation;
        if (op.getPropertyState().getHierarchyEntry() != this) {
            throw new IllegalArgumentException();
        }
        switch (operation.getStatus()) {
            case Operation.STATUS_PERSISTED:
                // Property can only be the change log target if it was existing and has
                // been modified. This includes the case where a property was changed and
                // then removed by removing its parent. See JCR-2462.
                // Removal, add and implicit modification of protected
                // properties must be persisted by save on parent.
                PropertyState state = op.getPropertyState();
                if (state.getStatus() != Status.REMOVED) {
                    state.setStatus(Status.EXISTING);
                }
                break;
            case Operation.STATUS_UNDO:
View Full Code Here

     */
    public void complete(Operation operation) throws RepositoryException {
        if (!(operation instanceof SetPropertyValue)) {
            throw new IllegalArgumentException();
        }
        SetPropertyValue op = (SetPropertyValue) operation;
        if (op.getPropertyState().getHierarchyEntry() != this) {
            throw new IllegalArgumentException();
        }
        switch (operation.getStatus()) {
            case Operation.STATUS_PERSISTED:
                /*
                NOTE: Property can only be the changelog target, if it was
                      existing and has been modified. removal, add and implicit modification
                      of protected properties must be persisted by save on parent.
                */
                op.getPropertyState().setStatus(Status.EXISTING);
                break;
            case Operation.STATUS_UNDO:
                revert();
                break;
            default:
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.jcr2spi.operation.SetPropertyValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.