Examples of ObjectFactory


Examples of org.apache.cxf.transports.http.configuration.ObjectFactory

    public Class<HTTPClientPolicy> getDataClass() {
        return HTTPClientPolicy.class;
    }

    public QName getDataClassName() {
        return new ObjectFactory().createClient(null).getName();
    }
View Full Code Here

Examples of org.apache.cxf.ws.addressing.ObjectFactory

     * Set the address of the provided endpoint reference.
     * @param ref - the endpoint reference
     * @param address - the address
     */
    public static void setAddress(EndpointReferenceType ref, String address) {
        AttributedURIType a = new ObjectFactory().createAttributedURIType();
        a.setValue(address);
        ref.setAddress(a);
    }
View Full Code Here

Examples of org.apache.cxf.ws.discovery.wsdl.ObjectFactory

       
            if (addSeq) {
                AppSequenceType s = new AppSequenceType();
                s.setInstanceId(instanceId);
                s.setMessageNumber(msgId.getAndIncrement());
                JAXBElement<AppSequenceType> seq = new ObjectFactory().createAppSequence(s);
                Header h = new Header(seq.getName(),
                                      seq,
                                      new JAXBDataBinding(getJAXBContext()));
                List<Header> headers = new ArrayList<Header>();
                headers.add(h);
View Full Code Here

Examples of org.apache.cxf.ws.eventing.ObjectFactory

        EndpointReferenceType eventSink = new EndpointReferenceType();
        AttributedURIType eventSinkAddr = new AttributedURIType();
        eventSinkAddr.setValue(targetURL);
        eventSink.setAddress(eventSinkAddr);
        sub.setDelivery(new DeliveryType());
        sub.getDelivery().getContent().add(new ObjectFactory().createNotifyTo(eventSink));

        // filter
        if (filter != null && filter.length() > 0) {
            sub.setFilter(new FilterType());
            sub.getFilter().getContent().add(filter);
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.ObjectFactory

        verifyHeaders(message, new String[] {RMConstants.SEQUENCE_FAULT_NAME});

    }

    private void setUpOutbound() {
        ObjectFactory factory = new ObjectFactory();
        s1 = factory.createSequenceType();
        Identifier sid = factory.createIdentifier();
        sid.setValue("sequence1");
        s1.setIdentifier(sid);
        s1.setMessageNumber(ONE);
        s2 = factory.createSequenceType();
        sid = factory.createIdentifier();
        sid.setValue("sequence2");
        s2.setIdentifier(sid);
        s2.setMessageNumber(TEN);

        ack1 = factory.createSequenceAcknowledgement();
        SequenceAcknowledgement.AcknowledgementRange r =
            factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(ONE);
        r.setUpper(ONE);
        ack1.getAcknowledgementRange().add(r);
        ack1.setIdentifier(s1.getIdentifier());

        ack2 = factory.createSequenceAcknowledgement();
        r = factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(ONE);
        r.setUpper(TEN);
        ack2.getAcknowledgementRange().add(r);
        ack2.setIdentifier(s2.getIdentifier());

        ar1 = factory.createAckRequestedType();
        ar1.setIdentifier(s1.getIdentifier());

        ar2 = factory.createAckRequestedType();
        ar2.setIdentifier(s2.getIdentifier());
    }
View Full Code Here

Examples of org.apache.cxf.ws.security.sts.provider.model.ObjectFactory

            }
            if (obj instanceof RequestSecurityTokenResponseCollectionType) {
                RequestSecurityTokenResponseCollectionType tokenResponse =
                    (RequestSecurityTokenResponseCollectionType)obj;
                response = new JAXBSource(jaxbContext,
                                          new ObjectFactory()
                                          .createRequestSecurityTokenResponseCollection(tokenResponse));
            } else {
                RequestSecurityTokenResponseType tokenResponse =
                    (RequestSecurityTokenResponseType)obj;
                response = new JAXBSource(jaxbContext,
                                          new ObjectFactory()
                                          .createRequestSecurityTokenResponse(tokenResponse));
            }

        } catch (InvocationTargetException ex) {
            Throwable cause = ex.getCause();
View Full Code Here

Examples of org.apache.cxf.xkms.model.xmldsig.ObjectFactory

        return unverifiedKeyBinding;
    }

    public static KeyInfoType getKeyInfo(X509Certificate cert) throws CertificateEncodingException {
        KeyInfoType keyInfo = new KeyInfoType();
        JAXBElement<byte[]> certificate = new ObjectFactory().createX509DataTypeX509Certificate(cert.getEncoded());
        X509DataType x509DataType = new X509DataType();
        List<Object> x509DataContent = x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName();
        x509DataContent.add(certificate);
        JAXBElement<X509DataType> x509Data = new ObjectFactory().createX509Data(x509DataType);
        List<Object> keyInfoContent = keyInfo.getContent();
        keyInfoContent.add(x509Data);
        return keyInfo;
    }
View Full Code Here

Examples of org.apache.excalibur.mpool.ObjectFactory

        final String classname = metaEntry.getComponentClass().getName();
        final Configuration configuration = metaData.getConfiguration();

        try
        {
            final ObjectFactory factory =
                    createObjectFactory( classname, configuration );

            // create the appropriate handler instance
            final ComponentHandler targetHandler =
                    (ComponentHandler) metaEntry.getHandlerClass().newInstance();
View Full Code Here

Examples of org.apache.falcon.oozie.coordinator.ObjectFactory

    }

    protected String marshal(Cluster cluster, COORDINATORAPP coord, Path outPath,
                             String name) throws FalconException {
        name = (StringUtils.isEmpty(name) ? "coordinator" : name) + ".xml";
        marshal(cluster, new ObjectFactory().createCoordinatorApp(coord),
                OozieUtils.COORD_JAXB_CONTEXT, new Path(outPath, name));
        return name;
    }
View Full Code Here

Examples of org.apache.geronimo.jee.deployment.ObjectFactory

            if (gbean == null) {
                gbean = (Gbean)getEFactory().create(Gbean.class);
                JAXBElement plan = section.getPlan();
               
                // add the JAXBElement of a GBean, not the GBean
                ObjectFactory objectFactory = new ObjectFactory();
                JAXBModelUtils.getGbeans(plan).add(objectFactory.createGbean((Gbean)gbean));
            }
            gbean.setName(textList.get(0).getText());
            gbean.setClazz(textList.get(1).getText());
            break;

        case ATTRIBUTE:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
                return false;
            }
            Attribute attribute = (Attribute)eObject;
            if (attribute == null) {
                attribute = (Attribute)getEFactory().create(Attribute.class);
                gbean = (Gbean)section.getSelectedObject();
               
                // add the JAXBElement of an Attribute, not the Attribute
                ObjectFactory objectFactory = new ObjectFactory();
                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanAttribute(attribute));
            }
            attribute.setName(textList.get(0).getText());
            attribute.setType(textList.get(1).getText());
            attribute.setValue(textList.get(2).getText());
            break;

        case DEPENDENCY:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
                return false;
            }
            Pattern dependency = (Pattern)eObject;
            if (dependency == null) {
                dependency = (Pattern)getEFactory().create(Pattern.class);
                gbean = (Gbean)section.getSelectedObject();

                // add the JAXBElement of a Dependency, not the Dependency
                ObjectFactory objectFactory = new ObjectFactory();
                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanDependency(dependency));
            }
            dependency.setGroupId(textList.get(0).getText());
            dependency.setArtifactId(textList.get(1).getText());
            dependency.setVersion(textList.get(2).getText());
            dependency.setModule(textList.get(3).getText());
            dependency.setType(textList.get(4).getText());
            dependency.setCustomFoo(textList.get(5).getText());
            break;

        case REFERENCE:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText()) ||
                    isEmpty(textList.get(2).getText())) {
                return false;
            }
            Reference reference = (Reference)eObject;
            if (reference == null) {
                reference = (Reference)getEFactory().create(Reference.class);
                gbean = (Gbean)section.getSelectedObject();

                // add the JAXBElement of a Dependency, not the Dependency
                ObjectFactory objectFactory = new ObjectFactory();
                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanReference(reference));
            }
            reference.setName(textList.get(0).getText());
            reference.setGroupId(textList.get(1).getText());
            reference.setArtifactId(textList.get(2).getText());
            reference.setVersion(textList.get(3).getText());
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.