public static synchronized Space getSpace()

in src/main/java/org/apache/cxf/cwiki/SiteExporter.java [1068:1092]


    public static synchronized Space getSpace(String key) { 
        Space space = spaces.get(key);
        if (space == null) {
            try {
                doLogin();
                
                Document doc = DOMUtils.newDocument();
                Element el = doc.createElementNS(SOAPNS, "ns1:getSpace");
                Element el2 = doc.createElement("in0");
                el.appendChild(el2);
                el2.setTextContent(loginToken);
                el2 = doc.createElement("in1");
                el.appendChild(el2);
                el2.setTextContent(key);
                doc.appendChild(el);
                
                Document out = getDispatch().invoke(doc);
                space = new Space(out);
                spaces.put(key, space);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return space;
    }