Examples of InstanceBuilder


Examples of au.edu.qut.yawl.forms.InstanceBuilder

        String schema = createCaseSchema(caseID, sessionHandle, _worklistController);
        parameters.put("schema", schema);
       
        // set instance data
        SpecificationData specData = _worklistController.getSpecificationData(caseID, sessionHandle);
        InstanceBuilder ib = new InstanceBuilder(schema, specData.getRootNetID(), null);
        parameters.put("instance", ib.getInstance());
       
        // TODO need to query specData for the names of output params belonging to the case
       
        // set input parameter data (if any)
        //parameters.put("inputparams", getInputOutputParams(specData.getInputParams()));
View Full Code Here

Examples of au.edu.qut.yawl.forms.InstanceBuilder

        WorkItemRecord item = _worklistController.getCachedWorkItem(workItemID);
        TaskInformation taskInfo = _worklistController.getTaskInformation(
                item.getSpecificationID(), item.getTaskID(), sessionHandle);
       
        // set instance data
        InstanceBuilder ib = new InstanceBuilder(schema, taskInfo.getDecompositionID(), item.getDataListString());
        parameters.put("instance", ib.getInstance());
       
        // set input params (if any exist)
        YParametersSchema paramsSignature = taskInfo.getParamSchema();
        parameters.put("inputparams", getInputOnlyParams(paramsSignature.getInputParams(), paramsSignature.getOutputParams()));
        parameters.put("root", taskInfo.getDecompositionID());
View Full Code Here

Examples of macromedia.asc.embedding.avmplus.InstanceBuilder

        // This should fill in this type
        cframe = TypeValue.defineTypeValue(cx, new ClassBuilder(pname, prot_ns, static_prot_ns), pname, TYPE_object);

        cframe.type = cx.typeType().getDefaultTypeInfo();
        ObjectValue iframe = new ObjectValue(cx,new InstanceBuilder(pname),cframe);
        cframe.prototype = iframe;

        //  TODO: Allow for other parameterized types some day.
        TypeValue uninstantiated_generic = cx.vectorObjType();
View Full Code Here

Examples of org.apache.felix.ipojo.extender.InstanceBuilder

    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);
    }

    public void testNoConfiguration() throws Exception {
        InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type");
        DeclarationHandle handle = builder.build();
        InstanceDeclaration did = (InstanceDeclaration) handle;

        assertEquals("type", did.getComponentName());
        assertEquals(InstanceDeclaration.UNNAMED_INSTANCE, did.getInstanceName());
        assertNull(did.getComponentVersion());
View Full Code Here

Examples of org.apache.felix.ipojo.extender.InstanceBuilder

        Dictionary<String,Object> configuration = did.getConfiguration();
        assertTrue(configuration.isEmpty());
    }

    public void testNameConfiguration() throws Exception {
        InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type").name("John");

        DeclarationHandle handle = builder.build();
        InstanceDeclaration did = (InstanceDeclaration) handle;

        assertEquals("type", did.getComponentName());
        assertEquals("John", did.getInstanceName());
        assertNull(did.getComponentVersion());
View Full Code Here

Examples of org.apache.felix.ipojo.extender.InstanceBuilder

        Dictionary<String,Object> configuration = did.getConfiguration();
        assertEquals("John", configuration.get(Factory.INSTANCE_NAME_PROPERTY));
    }

    public void testVersionConfiguration() throws Exception {
        InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type").name("John").version("1.0");

        DeclarationHandle handle = builder.build();
        InstanceDeclaration did = (InstanceDeclaration) handle;

        assertEquals("type", did.getComponentName());
        assertEquals("John", did.getInstanceName());
        assertEquals("1.0", did.getComponentVersion());
View Full Code Here

Examples of org.apache.felix.ipojo.extender.InstanceBuilder

        assertEquals("John", configuration.get(Factory.INSTANCE_NAME_PROPERTY));
        assertEquals("1.0", configuration.get(Factory.FACTORY_VERSION_PROPERTY));
    }

    public void testBuilderReUseProvidesDifferentInstances() throws Exception {
        InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type");
        assertNotSame(builder.build(), builder.build());
    }
View Full Code Here

Examples of org.apache.felix.ipojo.extender.InstanceBuilder

        assertNotSame(builder.build(), builder.build());
    }


    public void testDeclarationIsNotAutomaticallyStarted() throws Exception {
        InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type");
        DeclarationHandle handle = builder.build();
        DefaultInstanceDeclaration did = (DefaultInstanceDeclaration) handle;

        assertFalse(did.isRegistered());
    }
View Full Code Here

Examples of org.apache.felix.ipojo.extender.InstanceBuilder

        assertFalse(did.isRegistered());
    }

    public void testDeepConfiguration() throws Exception {
        InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type");
        assertNotNull(builder.configure());
    }
View Full Code Here

Examples of org.apache.felix.ipojo.extender.InstanceBuilder

    public void testNewInstance() throws Exception {
        DefaultDeclarationBuilderService service = new DefaultDeclarationBuilderService(m_bundleContext);
        assertNotNull(service.newInstance("type.of.component"));
        assertNotNull(service.newInstance("type.of.component", "instance.name"));
        InstanceBuilder builder = service.newInstance("type.of.component", "instance.name", "component.version");
        assertNotNull(builder);
        DeclarationHandle instance = builder.build();
        instance.publish();
        verify(m_bundleContext).registerService(
                eq(InstanceDeclaration.class.getName()),
                anyObject(),
                any(Dictionary.class));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.