Package org.apache.oozie.cli

Examples of org.apache.oozie.cli.TestOozieCLIMethods$DataObject


        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("dataObject.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 2);
        Process process = getRootProcess(definitions);
        assertTrue(process.getFlowElements().iterator().next() instanceof DataObject);
        DataObject da = (DataObject) process.getFlowElements().iterator().next();
        assertEquals("data object", da.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here


            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.DATA_OBJECT: {
            DataObject dataObject = (DataObject) theEObject;
            T result = caseDataObject(dataObject);
            if (result == null)
                result = caseFlowElement(dataObject);
            if (result == null)
                result = caseItemAwareElement(dataObject);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setDataObjectRef(DataObject newDataObjectRef) {
        DataObject oldDataObjectRef = dataObjectRef;
        dataObjectRef = newDataObjectRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.DATA_OBJECT_REFERENCE__DATA_OBJECT_REF, oldDataObjectRef,
                    dataObjectRef));
View Full Code Here

    @Override
    public IReason updateNeeded(IUpdateContext context) {
      IPeService peService = Graphiti.getPeService();
      ContainerShape container = (ContainerShape) context.getPictogramElement();
      DataObject data = (DataObject) getBusinessObjectForPictogramElement(container);
      boolean isCollection = Boolean.parseBoolean(peService.getPropertyValue(container,
          Properties.COLLECTION_PROPERTY));
      return data.isIsCollection() != isCollection ? Reason.createTrueReason() : Reason.createFalseReason();
    }
View Full Code Here

    @Override
    public boolean update(IUpdateContext context) {
      IPeService peService = Graphiti.getPeService();
      ContainerShape container = (ContainerShape) context.getPictogramElement();
      DataObject data = (DataObject) getBusinessObjectForPictogramElement(container);

      boolean drawCollectionMarker = data.isIsCollection();

      Iterator<Shape> iterator = peService.getAllContainedShapes(container).iterator();
      while (iterator.hasNext()) {
        Shape shape = iterator.next();
        String prop = peService.getPropertyValue(shape, Properties.HIDEABLE_PROPERTY);
        if (prop != null && new Boolean(prop)) {
          Polyline line = (Polyline) shape.getGraphicsAlgorithm();
          line.setLineVisible(drawCollectionMarker);
        }
      }

      peService.setPropertyValue(container, Properties.COLLECTION_PROPERTY,
          Boolean.toString(data.isIsCollection()));
      return true;
    }
View Full Code Here

          "Provides information about what activities require to be performed or what they produce");
    }

    @Override
    protected DataObject createFlowElement(ICreateContext context) {
      DataObject data = ModelHandler.FACTORY.createDataObject();
      data.setIsCollection(false);
      data.setName("Data Object");
      return data;
    }
View Full Code Here

        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = unmarshaller.unmarshall(getTestJsonFile("dataObject.json"));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = (Process) definitions.getRootElements().get(0);
        assertTrue(process.getFlowElements().iterator().next() instanceof DataObject);
        DataObject da = (DataObject) process.getFlowElements().iterator().next();
        assertEquals("data object", da.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

TOP

Related Classes of org.apache.oozie.cli.TestOozieCLIMethods$DataObject

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.