3. UberFire is a web framework for a superior
experience in building extensible workbenches and
console type applications.
It provides an Eclipse like workbench
experience for the web, helping you to make
maintainable, customizable workbench-style
apps in no time flat.
Our ultimate goal in uberfire is to provide a strong
ecosystem around it, based on a rich set of
pluggable components and a strong infrastructure,
allowing different type of users easily build Rich
Web Apps on top of it….
What?
27. @WorkbenchPerspective(identifier = "HomePerspective", isDefault = true)
public class HomePerspective {
@Perspective
public PerspectiveDefinition buildPerspective() {
final PerspectiveDefinition p = new PerspectiveDefinitionImpl();
p.setName( "Home Perspective" );
p.getRoot().addPart( new PartDefinitionImpl( new DefaultPlaceRequest( "HomeScreen" ) ) );
return p;
}
}
How? Perspectives
28. @WorkbenchScreen( identifier = "MyFirstPanel" )
public class MyFirstPanel extends SimplePanel {
public MyFirstPanel() {
setWidget( new Label( "Hello World 1" ) );
}
@WorkbenchPartTitle
public String myTitle() {
return "My First Panel!";
}
}
How? Screens
29. @WorkbenchEditor( identifier = "TextEditor", supportedTypes = { TextResourceType.class })
public class TextEditorPresenter {
@WorkbenchPartTitle
public String getTitle() {
return "Text Editor [" + path.getFileName() + "]";
}
@WorkbenchPartView
public IsWidget getWidget() {
return view; //injected
}
}
How? Editors
30. @WorkbenchEditor( identifier = "TextEditor", supportedTypes = { TextResourceType.class })
public class TextEditorPresenter {
@Inject
TextEditorView view;
@OnStartup
public void onStart( final Path path ) {
//Load content and initialise view
this.view.setContent( loadContent( path ) );
}
}
How? Life-cycles
31. public interface PlaceManager {
void goTo( final String identifier );
void goTo( final PlaceRequest place );
void goTo( final Path path );
void closePlace( final String id );
void closePlace( final PlaceRequest place );
...
}
How? PlaceManager
35. ● Pluggable
○ Multiple backends
● Portable
○ Same API for Client and Server
● Auth/Authz
● Declarative/Programmatic
○ API
○ Annotations
How? Security
36. @WorkbenchScreen(identifier = "MyScreen")
@Roles({"Admin", "Management"})
public class MyScreen {
@WorkbenchPartView
public IsWidget getView() {
return new SimplePanel();
}
@WorkbenchPartTitle
public String getTitle() {
return "My Screen";
}
}
How? Security
37. How? Security
public class Project implements RuntimeResource {
private Collection<String> roles = new ArrayList<String>();
@Override
public String getSignatureId() {
return getClass().getName() + "#" + getRootPath().toURI();
}
@Override
public Collection<String> getRoles() {
return roles;
}
@Override
public Collection<String> getTraits() {
return Collections.emptySet();
}
}