//handle the case of a store changing workspace
if ( source instanceof StoreInfo ) {
i = event.getPropertyNames().indexOf( "workspace");
if ( i > -1 ) {
WorkspaceInfo newWorkspace = (WorkspaceInfo) event.getNewValues().get( i );
File oldDir = dir( (StoreInfo) source );
oldDir.renameTo( new File( dir( newWorkspace ), oldDir.getName() ) );
}
}
//handle default workspace
if ( source instanceof Catalog ) {
i = event.getPropertyNames().indexOf("defaultWorkspace");
if ( i > -1 ) {
WorkspaceInfo defWorkspace = (WorkspaceInfo) event.getNewValues().get( i );
File d = rl.createDirectory( "workspaces");
persist(defWorkspace, new File(d, "default.xml"));
}
}