Ignore:
Timestamp:
2012-05-22T13:01:04+12:00 (12 years ago)
Author:
sjm84
Message:

Fixing Greenstone 3's use (or lack thereof) of generics, this was done automatically so we may want to change it over time. This change will also auto-format any files that have not already been formatted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java

    r25550 r25635  
    3737import java.io.File;
    3838import java.io.FileWriter;
     39import java.io.Serializable;
    3940import java.lang.Thread.State;
    4041import java.util.Locale;
     
    8283
    8384    // set of listeners for any construction commands
    84     protected Map listeners = null;
     85    protected Map<String, GS2PerlListener> listeners = null;
    8586    protected HashMap<String, Boolean> collectionOperationMap = new HashMap<String, Boolean>();
    8687
    8788    public GS2Construct()
    8889    {
    89         this.listeners = Collections.synchronizedMap(new HashMap());
     90        this.listeners = Collections.synchronizedMap(new HashMap<String, GS2PerlListener>());
    9091    }
    9192
     
    175176        String id = statusElem.getAttribute("pid");
    176177
    177         GS2PerlListener currentListener = (GS2PerlListener) this.listeners.get(id);
     178        GS2PerlListener currentListener = this.listeners.get(id);
    178179        int statusCode = currentListener.getStatus();
    179180        while (!GSStatus.isCompleted(statusCode))
     
    199200    {
    200201        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    201         HashMap params = GSXML.extractParams(param_list, false);
     202        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    202203
    203204        //If we have been requested to only build certain documents then we need to create a manifest file
     
    264265        // the MR about it. but we have to wait until the process is finished.
    265266        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    266         HashMap params = GSXML.extractParams(param_list, false);
     267        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    267268        String coll_name = (String) params.get(COL_PARAM);
    268269        String lang = request.getAttribute(GSXML.LANG_ATT);
     
    288289        }
    289290        String id = status.getAttribute(GSXML.STATUS_PROCESS_ID_ATT);
    290         GS2PerlListener listener = (GS2PerlListener) this.listeners.get(id);
     291        GS2PerlListener listener = this.listeners.get(id);
    291292        if (listener == null)
    292293        {
     
    342343
    343344        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    344         HashMap params = GSXML.extractParams(param_list, false);
     345        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    345346
    346347        boolean get_status_only = false;
     
    400401
    401402        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    402         HashMap params = GSXML.extractParams(param_list, false);
     403        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    403404
    404405        boolean get_status_only = false;
     
    551552
    552553        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    553         HashMap params = GSXML.extractParams(param_list, false);
     554        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    554555
    555556        boolean get_status_only = false;
     
    564565            String id = (String) params.get(PROCESS_ID_PARAM);
    565566            status.setAttribute(GSXML.STATUS_PROCESS_ID_ATT, id);
    566             GS2PerlListener listener = (GS2PerlListener) this.listeners.get(id);
     567            GS2PerlListener listener = this.listeners.get(id);
    567568            if (listener == null)
    568569            {
     
    725726     * element
    726727     */
    727     protected Element extractOtherParams(HashMap params, int type)
     728    protected Element extractOtherParams(HashMap<String, Serializable> params, int type)
    728729    {
    729730
     
    758759    {
    759760        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    760         HashMap params = GSXML.extractParams(param_list, false);
     761        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    761762       
    762763        String collection = (String)params.get(COL_PARAM);
     
    783784    {
    784785        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    785         HashMap params = GSXML.extractParams(param_list, false);
     786        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    786787       
    787788        String collection = (String)params.get(COL_PARAM);
Note: See TracChangeset for help on using the changeset viewer.