Examples of ObjectFactory


Examples of org.jboss.identity.federation.ws.addressing.ObjectFactory

      AttributedURIType attributedURI = new AttributedURIType();
      attributedURI.setValue(endpointURI);
      EndpointReferenceType reference = new EndpointReferenceType();
      reference.setAddress(attributedURI);
      AppliesTo appliesTo = new AppliesTo();
      appliesTo.getAny().add(new ObjectFactory().createEndpointReference(reference));

      return appliesTo;
   }
View Full Code Here

Examples of org.jboss.identity.federation.ws.trust.ObjectFactory

      try
      {
         this.marshaller = JAXBUtil.getMarshaller(this.getPackages());
         this.unmarshaller = JAXBUtil.getUnmarshaller(this.getPackages());
         this.binder = JAXBUtil.getJAXBContext(this.getPackages()).createBinder();
         this.objectFactory = new ObjectFactory();
      }
      catch (JAXBException e)
      {
         throw new RuntimeException(e.getMessage(), e);
      }
View Full Code Here

Examples of org.jboss.resteasy.test.providers.jaxb.generated.po.ObjectFactory

      catch (PropertyException e)
      {
         logger.warn(e.getMessage(), e);
      }
      marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
      ObjectFactory factory = new ObjectFactory();
      marshaller.marshal(factory.createPurchaseOrder(po), System.out);
   }
View Full Code Here

Examples of org.jboss.seam.security.external.jaxb.samlv2.metadata.ObjectFactory

    }

    public abstract void writeMetaData(Writer writer);

    protected void addKeyDescriptorToMetaData(SSODescriptorType ssoDescriptor) {
        ObjectFactory metaDataFactory = new ObjectFactory();
        org.jboss.seam.security.external.jaxb.xmldsig.ObjectFactory signatureFactory = new org.jboss.seam.security.external.jaxb.xmldsig.ObjectFactory();

        X509Certificate certificate = getSigningKey().getCertificate();
        if (certificate == null)
            throw new RuntimeException("Certificate obtained from configuration is null");

        JAXBElement<byte[]> X509Certificate;
        try {
            X509Certificate = signatureFactory.createX509DataTypeX509Certificate(certificate.getEncoded());
        } catch (CertificateEncodingException e) {
            throw new RuntimeException(e);
        }

        X509DataType X509Data = signatureFactory.createX509DataType();
        X509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(X509Certificate);

        KeyInfoType keyInfo = signatureFactory.createKeyInfoType();
        keyInfo.getContent().add(signatureFactory.createX509Data(X509Data));

        KeyDescriptorType keyDescriptor = metaDataFactory.createKeyDescriptorType();
        keyDescriptor.setUse(KeyTypes.SIGNING);
        keyDescriptor.setKeyInfo(keyInfo);

        ssoDescriptor.getKeyDescriptor().add(keyDescriptor);
    }
View Full Code Here

Examples of org.jboss.seam.security.external.jaxb.samlv2.protocol.ObjectFactory

            samlRequest.setDestination(endpoint.getLocation());

            JAXBElement<?> requestElement;
            if (samlRequest instanceof AuthnRequestType) {
                AuthnRequestType authnRequest = (AuthnRequestType) samlRequest;
                requestElement = new ObjectFactory().createAuthnRequest(authnRequest);
            } else if (samlRequest instanceof LogoutRequestType) {
                LogoutRequestType logoutRequest = (LogoutRequestType) samlRequest;
                requestElement = new ObjectFactory().createLogoutRequest(logoutRequest);
            } else {
                throw new RuntimeException("Currently only authentication and logout requests can be sent");
            }

            Binder<Node> binder = jaxbContext.createBinder();
View Full Code Here

Examples of org.jboss.seam.security.external.jaxb.xrds.ObjectFactory

     *
     * @param writer writer to use
     */
    public void writeOpIdentifierXrds(Writer writer) {
        try {
            ObjectFactory objectFactory = new ObjectFactory();

            XRDS xrds = objectFactory.createXRDS();

            XRD xrd = objectFactory.createXRD();

            Type type = objectFactory.createType();
            type.setValue(DiscoveryInformation.OPENID2_OP);
            URIPriorityAppendPattern uri = objectFactory.createURIPriorityAppendPattern();
            uri.setValue(getServiceURL(OpenIdService.OPEN_ID_SERVICE));

            Service service = objectFactory.createService();
            service.getType().add(type);
            service.getURI().add(uri);

            xrd.getService().add(service);

View Full Code Here

Examples of org.jboss.security.xacml.core.model.context.ObjectFactory

   /**
    * @see RequestContext#setRequest(RequestType)
    */
   public void setRequest(RequestType requestType) throws IOException
   {
      JAXBElement<RequestType> requestJAXB = new ObjectFactory().createRequest(requestType);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      JAXB.marshal(requestJAXB, baos);
      ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
      readRequest(bis)
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.ObjectFactory

   }
  
   public static XACMLPolicy createPolicy(PolicyType policyFile)
   throws Exception
   {
      JAXBElement<PolicyType> jaxbPolicy = new ObjectFactory().createPolicy(policyFile);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      JAXB.marshal(jaxbPolicy, baos);
      ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
      return (XACMLPolicy) getCtr().newInstance(new Object[]
                                                  { bis,
View Full Code Here

Examples of org.jbpm.configuration.ObjectFactory

    catch (Exception e) {
      // okay
    }

    MockControl factoryControl = MockControl.createControl(ObjectFactory.class);
    ObjectFactory mockFactory = (ObjectFactory) factoryControl.getMock();
    configuration.setObjectFactory(mockFactory);

    MockControl beanFactoryControl = MockControl.createNiceControl(BeanFactory.class);
    BeanFactory beanFactory = (BeanFactory) beanFactoryControl.getMock();

    JbpmContext context = new JbpmContext(null, mockFactory);
    factoryControl.expectAndReturn(mockFactory.createObject(JbpmContext.DEFAULT_JBPM_CONTEXT_NAME), context, 3);
    beanFactoryControl.replay();
    factoryControl.replay();

    // configuration.setBeanFactory(beanFactory);
    configuration.afterPropertiesSet();
View Full Code Here

Examples of org.jfree.xml.util.ObjectFactory

     * @throws XmlReaderException if there is a problem with the reader.
     */
    private XmlReadHandler findHandlerForClass(final Class classToRead, final Attributes atts,
                                               final ArrayList history)
        throws XmlReaderException {
        final ObjectFactory genericFactory = getFactoryLoader();

        if (history.contains(classToRead)) {
            throw new IllegalStateException("Circular reference detected: " + history);
        }
        history.add(classToRead);
        // check the manual mappings ...
        ManualMappingDefinition manualDefinition =
            this.classToHandlerMapping.getManualMappingDefinition(classToRead);
        if (manualDefinition == null) {
            manualDefinition = genericFactory.getManualMappingDefinition(classToRead);
        }
        if (manualDefinition != null) {
            // Log.debug ("Locating handler for " + manualDefinition.getBaseClass());
            return loadHandlerClass(manualDefinition.getReadHandler());
        }
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.