Package Framework

Examples of Framework.TextData$qq_Resolver


     * <p>
     * @param source Type: Bra
     * @return BraNode
     */
    public BraNode setup(Bra source) {
        this.setDVNodeText(new TextData(source.getName()));
        this.setPrice(source.getCost());
        this.setRelated(source);
        return this;
    }
View Full Code Here


        return false;
    }

    public TextData getMessage() {
        if (this.message != null) {
            return new TextData(this.message);
        } else {
            return null;
        }
    }
View Full Code Here

    private Array_Of_TextData<TextData> typeName;
    private HashTable typeValue;

    public HTTPFactory() {
        super();
        TextData txt = null;
        this.typeValue = new HashTable();
        this.typeName = new Array_Of_TextData<TextData>();

        //  Field name of headers are case insensitives (HTTP spec)
        HashFuncs hashFunctions = new HashFuncs(true, Framework.Constants.SP_KT_STRING, HashFuncs.qq_Resolver.cIGNORECASE_KEYTYPE);
        this.typeValue.setup(16, hashFunctions, true);

        //  Set the default values
        txt = new TextData(Constants.HTTP_FACTORY_REQUEST, TextData.qq_Resolver.cINTEGERVALUE);
        this.typeValue.enter(HTTPBaseRequest.class, txt.toString());

        txt = new TextData(Constants.HTTP_FACTORY_RESPONSE, TextData.qq_Resolver.cINTEGERVALUE);
        this.typeValue.enter(HTTPBaseResponse.class, txt.toString());

        txt = new TextData(Constants.HTTP_FACTORY_SESSION, TextData.qq_Resolver.cINTEGERVALUE);
        this.typeValue.enter(HTTPSession.class, txt.toString());
    }
View Full Code Here

        if (this.containsMimeType(mimeType)) {
            this.typeValue.remove(mimeType);
        }
        else {
            TextData txt = new TextData(mimeType);
            this.typeName.add(txt);
        }

        this.typeValue.enter(type, mimeType);
    }
View Full Code Here

     * HTTPSupport uses this method to automatically create instances of HTTP requests and responses.
     * @param id
     * @return
     */
    public Object getObjectInstance(int id){
        TextData txt = new TextData(id, TextData.qq_Resolver.cINTEGERVALUE);
        Class<?> objClassType = (Class <?>)this.typeValue.find(txt.toString());
        Object obj = null;

        if (objClassType != null) {
            obj = FrameworkUtils.newInstance(objClassType);
        }
View Full Code Here

     * @param type
     * @param id
     */
    public void registerClass(Class<?> type, int id){
        Object typeInstance = FrameworkUtils.newInstance(type);
        TextData txt = null;
        TextData txt2 = null;

        //  Type and id checking for reserved values
        if (id > 0) {
            boolean error = false;

            switch (id) {
                case Constants.HTTP_FACTORY_RESPONSE: {
                    if (typeInstance instanceof HTTPBaseResponse == false) {
                        error = true;
                        txt2 = new TextData("HTTPBaseResponse");
                    }

                    break;
                }
                case Constants.HTTP_FACTORY_REQUEST: {
                    if (typeInstance instanceof HTTPBaseRequest == false) {
                        error = true;
                        txt2 = new TextData("HTTPBaseRequest");
                    }
                    break;
                }
                case Constants.HTTP_FACTORY_SESSION: {
                    if (typeInstance instanceof HTTPSession == false) {
                        error = true;
                        txt2 = new TextData("HTTPSession");
                    }
                    break;
                }
            }

            if (error == true) {
                DistributedAccessException ex = new DistributedAccessException();
                txt = new TextData(FrameworkUtils.getClassName(type,false));

                ex.setWithParams(Framework.Constants.SP_ER_USER, new TextData(Application.getMsgCatalog().getString(Constants.HTTP_SET, Constants.HTTP_MSG_FACTORY_NOT_HTTP_MESSAGE)), txt, txt2, (DataValue)null, (DataValue)null, (DataValue)null, (DataValue)null, (DataValue)null, (DataValue)null, (DataValue)null);
                throw ex;
            }
        }

        if (typeInstance instanceof HTTPBaseRequest) {
            txt = new TextData(Constants.HTTP_FACTORY_REQUEST, TextData.qq_Resolver.cINTEGERVALUE);
            txt2 = new TextData("HTTPBaseRequest");

        }
        else if (typeInstance instanceof HTTPBaseResponse) {
            txt = new TextData(Constants.HTTP_FACTORY_RESPONSE, TextData.qq_Resolver.cINTEGERVALUE);
            txt2 = new TextData("HTTPBaseResponse ");

        }
        else if (typeInstance instanceof HTTPSession) {
            txt = new TextData(Constants.HTTP_FACTORY_SESSION, TextData.qq_Resolver.cINTEGERVALUE);
            txt2 = new TextData("HTTPSession ");

        }
        else if (id > 0) {
            txt = new TextData(id, TextData.qq_Resolver.cINTEGERVALUE);
            txt2 = txt;
        }
        else {
            return;
        }
View Full Code Here

     */
    public Array_Of_TextData<TextData> getHeaderNames() {
        Array_Of_TextData<TextData> headerNames = new Array_Of_TextData<TextData>();
        Iterator<String> itr = this.headerName.iterator();
        while (itr.hasNext()) {
            headerNames.add(new TextData((String) itr.next()));
        }
        return headerNames;
    }
View Full Code Here

     *            The name parameter specifies the name of the header
     * @return The value of the header name returned as a TextData
     */
    public TextData getTextHeader(String name) {
        if (this.getHeader(name) != null) {
            return new TextData(this.getHeader(name));
        } else {
            return null;
        }
    }
View Full Code Here

            throw errorVar;
        }
    }

    protected String dataValueToString(DataValue value) {
        TextData buffer = new TextData();
        value.fillString(buffer);
        return buffer.toString();
    }
View Full Code Here

        ErrorMgr.addError(errorVar);
        throw errorVar;
    }

    public TextData getTextBody() {
        return new TextData(this.content.getString());
    }
View Full Code Here

TOP

Related Classes of Framework.TextData$qq_Resolver

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.