Changeset 3893


Ignore:
Timestamp:
2003-03-18T15:00:05+12:00 (21 years ago)
Author:
kjdon
Message:

added new convenience method createDescribeRequest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/Action.java

    r3645 r3893  
    6868    /** the main process method - must be implemented in subclass */
    6969    abstract public Element process(Element xml_in);
    70    
    71    
     70
     71    /** returns a describe request message */
     72    protected Element createDescribeRequest(String to, String lang,
     73                        String info) {
     74    Element info_message = doc_.createElement(GSXML.MESSAGE_ELEM);
     75    Element info_request = doc_.createElement(GSXML.REQUEST_ELEM);
     76    info_message.appendChild(info_request);
     77    info_request.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_DESCRIBE);
     78    info_request.setAttribute(GSXML.LANG_ATT, lang);
     79    info_request.setAttribute(GSXML.TO_ATT, to);
     80    if (info != null) {
     81        info_request.setAttribute(GSXML.INFO_ATT, info);
     82    }
     83    return info_message;
     84    }
    7285}
    7386
Note: See TracChangeset for help on using the changeset viewer.