Package org.modeshape.jcr.api

Examples of org.modeshape.jcr.api.JcrTools$Operation


            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.OPERATION: {
            Operation operation = (Operation) theEObject;
            T result = caseOperation(operation);
            if (result == null)
                result = caseBaseElement(operation);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setOperationRef(Operation newOperationRef) {
        Operation oldOperationRef = operationRef;
        operationRef = newOperationRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.RECEIVE_TASK__OPERATION_REF, oldOperationRef, operationRef));
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setOperationRef(Operation newOperationRef) {
        Operation oldOperationRef = operationRef;
        operationRef = newOperationRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.MESSAGE_EVENT_DEFINITION__OPERATION_REF, oldOperationRef,
                    operationRef));
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setOperationRef(Operation newOperationRef) {
        Operation oldOperationRef = operationRef;
        operationRef = newOperationRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.INPUT_OUTPUT_BINDING__OPERATION_REF, oldOperationRef, operationRef));
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setOperationRef(Operation newOperationRef) {
        Operation oldOperationRef = operationRef;
        operationRef = newOperationRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.SEND_TASK__OPERATION_REF, oldOperationRef, operationRef));
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setOperationRef(Operation newOperationRef) {
        Operation oldOperationRef = operationRef;
        operationRef = newOperationRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.SERVICE_TASK__OPERATION_REF, oldOperationRef, operationRef));
    }
View Full Code Here

        for (final Iterator iterator = nodes.iterator(); iterator.hasNext();)
        {
            final Object nextNode = iterator.next();
            if (nextNode instanceof CallOperationAction)
            {
                final Operation operation = ((CallOperationAction)nextNode).getOperation();
                if (operation != null)
                {
                    operations.add(operation);
                }
            }
View Full Code Here

        for (final Iterator iterator = nodes.iterator(); iterator.hasNext();)
        {
            final Object nextNode = iterator.next();
            if (nextNode instanceof CallOperationAction)
            {
                final Operation operation = ((CallOperationAction)nextNode).getOperation();
                if (operation != null)
                {
                    operations.add(operation);
                }
            }
View Full Code Here

    }

    @Test
    @FixFor( "MODE-1978" )
    public void shouldAllowRemovingArtifactWithNoExistingTrash() throws Exception {
        JcrTools tools = new JcrTools();
        // print = true;

        // Register the node types ...
        registerNodeTypes("cnd/sramp.cnd");

        UUID uuid = UUID.randomUUID();
        Node artifacts = tools.findOrCreateNode(session, "/sramp/artifacts", "nt:folder");
        session.save();

        Node artifact = artifacts.addNode(uuid.toString(), "sramp:nonDocumentArtifactType");
        printMessage("Added artifact node: " + artifact);
        artifact.addMixin("sramp:xsdDocument");
        artifact.setProperty("sramp:uuid", uuid.toString());
        Node artifactChild = artifact.addNode("child", "sramp:derivedArtifactPrimaryType");
        printMessage("Added child node: " + artifactChild);
        artifactChild.addMixin("sramp:elementDeclaration");
        artifactChild.setProperty("sramp:uuid", UUID.randomUUID().toString());
        session.save();

        // Now "remove" it by removing the doc type mixins, adding the "deleted" mixin, and moving it to a different area ...
        artifact.addMixin("sramp:deletedArtifact");
        artifact.removeMixin("sramp:xsdDocument");
        artifactChild.addMixin("sramp:deletedArtifact");
        artifactChild.removeMixin("sramp:elementDeclaration");

        String srcPath = artifact.getPath();
        String trashPath = srcPath.replace("sramp", "sramp-trash");
        String parentSrcPath = artifacts.getPath();
        String parentTrashPath = parentSrcPath.replace("sramp", "sramp-trash");

        Node artifactTrash = tools.findOrCreateNode(session, parentTrashPath, "nt:folder");
        print(artifactTrash);

        session.move(srcPath, trashPath);
        session.save();
    }
View Full Code Here

                AbstractJcrNode parentOfOutput = null;
                try {
                    parentOfOutput = outputSession.getNode(work.getOutputPath());
                } catch (PathNotFoundException e) {
                    LOGGER.trace("Creating missing output path for {0}", logMsg);
                    JcrTools tools = new JcrTools();
                    parentOfOutput = (AbstractJcrNode)tools.findOrCreateNode(outputSession, work.getOutputPath());
                }

                // Now determine the name of top node in the output, using the last segment of the selected path ...
                String outputNodeName = computeOutputNodeName(selectedNode);
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.api.JcrTools$Operation

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.