public void saveNamespace(String name, Map<String, List> desc) throws Exception { StoreDesc sdesc = StoreDesc.getGlobalData(); m_gitService.putContent( sdesc.getRepository(), format(NAMESPACE_PATH, name), NAMESPACE_TYPE, m_js.deepSerialize(desc)); }
public List<Map> getNamespaces() throws Exception { StoreDesc sdesc = StoreDesc.getGlobalData(); List<String> types = new ArrayList(); types.add(NAMESPACE_TYPE); Map map = m_gitService.getWorkingTree( sdesc.getRepository(), NAMESPACES_PATH, 100, types, null, null, null); List<Map> childList = (List) map.get("children"); for (Map child : childList) { String name = (String) child.get("name"); Map m = new HashMap(); m.put("name", name); child.putAll(m); child.remove("children"); child.remove("path"); } return childList; }
public Map<String, List> getNamespace(String name) throws Exception { StoreDesc sdesc = StoreDesc.getGlobalData(); String ret = m_gitService.getContent(sdesc.getRepository(), format(NAMESPACE_PATH, name)); return (Map) m_ds.deserialize(ret); }
public void saveBranding(Map<String, String> desc) throws Exception { StoreDesc sdesc = StoreDesc.getGlobalData(); m_gitService.putContent( sdesc.getRepository(), BRANDING_PATH, "sw.setting", m_js.deepSerialize(desc)); }
public void deleteNamespace(String name) throws Exception { StoreDesc sdesc = StoreDesc.getGlobalData(); m_gitService.deleteObject(sdesc.getRepository(), format(NAMESPACE_PATH, name)); }