}
}
@Override
public CategoriesModelContent getContentByRoot( Path pathToRoot ) {
CategoriesModelContent categoriesModelContent = new CategoriesModelContent();
org.uberfire.java.nio.file.Path path = Paths.convert( pathToRoot ).resolve( "categories.xml" );
if ( !ioService.exists( path ) ) {
saveWithServerSidePath( path, new Categories() );
}
Path categoriesPath = Paths.convert( path );
categoriesModelContent.setPath( categoriesPath );
categoriesModelContent.setCategories( getContent( categoriesPath ) );
return categoriesModelContent;
}