use of it.geosolutions.geoserver.rest.GeoServerRESTReader in project sldeditor by robward-scisys.
the class GeoServerClient method refreshWorkspace.
/**
* Refresh workspace.
*
* @param workspaceName the workspace name
*/
@Override
public void refreshWorkspace(String workspaceName) {
GeoServerRESTManager manager = GeoServerRESTManagerFactory.getManager(connection);
if (manager != null) {
GeoServerRESTReader reader = manager.getReader();
if (reader != null) {
Map<String, List<StyleWrapper>> styleMap = new LinkedHashMap<String, List<StyleWrapper>>();
int count = 1;
List<StyleWrapper> styleList = new ArrayList<StyleWrapper>();
if (workspaceName.compareTo(DEFAULT_WORKSPACE_NAME) == 0) {
count = parseStyleInDefaultWorkspace(reader, count, styleList);
styleMap.put(DEFAULT_WORKSPACE_NAME, styleList);
} else {
// Read styles from workspace
count = parseStyleInWorkspace(reader, styleMap, count, workspaceName);
}
if (parentObj != null) {
parentObj.readStylesComplete(connection, styleMap, true);
}
}
}
}
Aggregations