Package org.apache.commons.lang3.builder

Examples of org.apache.commons.lang3.builder.Builder


        String jsonString = getBadgerfishJSONString();
        ByteArrayInputStream inStream = new ByteArrayInputStream(jsonString.getBytes());

        MessageContext msgCtx = new MessageContext();
        Builder omBuilder = new JSONBadgerfishOMBuilder();
        OMElement elem = omBuilder.processDocument(inStream,
                JSONTestConstants.CONTENT_TYPE_BADGERFISH, msgCtx);

        elem.toString();

        SOAPEnvelope envelope = TransportUtils.createSOAPEnvelope(elem);
View Full Code Here


            IOException, ParserConfigurationException, SAXException {
        String jsonString = getBadgerfishJSONString();
        ByteArrayInputStream inStream = new ByteArrayInputStream(jsonString.getBytes());
        MessageContext msgCtx = new MessageContext();

        Builder omBuilder = new JSONBadgerfishOMBuilder();
        OMElement elem = omBuilder.processDocument(inStream,
                JSONTestConstants.CONTENT_TYPE_BADGERFISH, msgCtx);

        elem.toString();

        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
View Full Code Here

            OMElement msgBuilderElement = (OMElement) msgBuilders.next();
            OMElement tempMsgBuilder = msgBuilderElement;
            OMAttribute builderName = tempMsgBuilder.getAttribute(new QName(TAG_CLASS_NAME));
            String className = builderName.getAttributeValue();
            Class builderClass = null;
            Builder builderObject;
            try {
                builderClass = findAndValidateSelectorClass(className,
                                                            DeploymentErrorMsgs.ERROR_LOADING_MESSAGE_BUILDER);
                builderObject = (Builder) builderClass.newInstance();
            } catch (PrivilegedActionException e) {
View Full Code Here

                } else if (msgContext.isDoingREST() && !JavaUtils.isTrueExplicitly(
                        msgContext.getProperty(Constants.Configuration.SOAP_RESPONSE_MEP))) {
                    type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML;
                }
            }
            Builder builder = BuilderUtil.getBuilderFromSelector(type, msgContext);
            if (builder != null) {
                documentElement = builder.processDocument(inStream, contentType, msgContext);
            }
        }
        if (documentElement == null) {
            if (msgContext.isDoingREST()) {
                StAXBuilder builder = BuilderUtil.getPOXBuilder(inStream, charsetEncoding);
                documentElement = builder.getDocumentElement();
            } else {
                // FIXME making soap defualt for the moment..might effect the
                // performance
                String charSetEnc = (String) msgContext
                        .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
                StAXBuilder builder = BuilderUtil.getSOAPBuilder(inStream, charSetEnc);
                documentElement = builder.getDocumentElement();
                charsetEncoding = builder.getDocument().getCharsetEncoding();
            }
        }

        SOAPEnvelope envelope;
        // Check whether we have received a SOAPEnvelope or not
View Full Code Here

        while (msgBuilders.hasNext()) {
            OMElement msgBuilderElement = (OMElement) msgBuilders.next();
            OMAttribute builderName = msgBuilderElement.getAttribute(new QName(TAG_CLASS_NAME));
            String className = builderName.getAttributeValue();
            Class builderClass = null;
            Builder builderObject;
            try {
                builderClass = findAndValidateSelectorClass(className,
                                                            DeploymentErrorMsgs.ERROR_LOADING_MESSAGE_BUILDER);
                builderObject = (Builder) builderClass.newInstance();
            } catch (PrivilegedActionException e) {
View Full Code Here

            throws AxisFault, XMLStreamException {
        OMElement documentElement = null;
        String type = null;
        if (contentType != null) {
            type = getContentType(contentType, msgContext);
            Builder builder = MessageProcessorSelector.getMessageBuilder(type, msgContext);
            if (builder != null) {
              if (log.isDebugEnabled()) {
                  log.debug("createSOAPEnvelope using Builder (" +
                            builder.getClass() + ") selected from type (" + type +")");
              }
                documentElement = builder.processDocument(inStream, contentType, msgContext);
            }
        }
        if (documentElement == null) {
            documentElement = createDefaultDocumentElement(msgContext, inStream, type);
        }
View Full Code Here

                    throw new RuntimeException("multiple buildable methods named " + name);
                }
                result = new Supplier<Object>() {
                    @Override
                    public Object get() {
                        Builder builder;
                        try {
                            builder = constructAndConfigure(bldClass, args);
                            Object val = transform(finishBuilder(builder),
                                                   Functional.invokeMethod(method, self));
                            if (val != self && val instanceof ListenableFuture) {
View Full Code Here

    @Override
    public int compareTo(
        @NotNull(message = "other can't be NULL") final RepoCommit other
    ) {
        return new CompareToBuilder().append(
            this.repo().coordinates(),
            other.repo().coordinates()
        ).append(this.sha(), other.sha()).build();
    }
View Full Code Here

    @Override
    public int compareTo(
        @NotNull(message = "cont should not be NULL") final Content cont
    ) {
        return new CompareToBuilder()
            .append(this.path(), cont.path())
                .append(this.repo().coordinates(), cont.repo().coordinates())
            .build();
    }
View Full Code Here

        @Override
        public int compareTo(
            @NotNull(message = "label can't be NULL") final Label label
        ) {
            return new CompareToBuilder()
                .append(this.repo().coordinates(), label.repo().coordinates())
                .append(this.obj, label.name())
                .build();
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang3.builder.Builder

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.