Author: pcraveiro
Date: 2012-03-14 19:56:35 -0400 (Wed, 14 Mar 2012)
New Revision: 1507
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/BeanFactory.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkClientModule.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkGinjector.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationDetails.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationEditor.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationPresenter.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationTable.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationView.java
Log:
First commit.
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/BeanFactory.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/BeanFactory.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/BeanFactory.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -22,7 +22,7 @@
package org.picketlink.as.console.client;
-import org.picketlink.as.console.client.shared.model.Federation;
+import org.picketlink.as.console.client.shared.subsys.model.Federation;
import com.google.gwt.autobean.shared.AutoBean;
import com.google.gwt.autobean.shared.AutoBeanFactory;
@@ -31,7 +31,7 @@
* @author pedroigor
* @sice Mar 13, 2012
*/
-public interface BeanFactory extends AutoBeanFactory {
+public interface BeanFactory extends org.jboss.as.console.client.shared.BeanFactory {
/**
* @return a new AutoBean<SystemDetails>
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkClientModule.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkClientModule.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkClientModule.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -23,7 +23,10 @@
import org.picketlink.as.console.client.profile.ui.FederationView;
import org.picketlink.as.console.client.profile.ui.MainPagePresenter;
import org.picketlink.as.console.client.profile.ui.MainPageView;
+import org.picketlink.as.console.client.shared.subsys.model.FederationStore;
+import org.picketlink.as.console.client.shared.subsys.model.FederationStoreImpl;
+import com.google.inject.Singleton;
import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
@@ -39,8 +42,10 @@
protected void configure() {
bindPresenter(MainPagePresenter.class, MainPagePresenter.MyView.class,
MainPageView.class,
MainPagePresenter.MyProxy.class);
+
bindPresenter(FederationPresenter.class, FederationPresenter.MyView.class,
FederationView.class,
FederationPresenter.MyProxy.class);
+ bind(FederationStore.class).to(FederationStoreImpl.class).in(Singleton.class);
}
}
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkGinjector.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkGinjector.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkGinjector.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -39,8 +39,8 @@
*
* @author Rob Cernich
*/
-@SubsystemExtension(subsystem="picketlink",
groups={@SubsystemGroupDefinition(name = ItemMenuProfileText.PICKETLINK, items = {
- @SubsystemItemDefinition(presenter = ProfileNameTokens.FEDERATION, name =
ItemMenuProfileText.FEDERATION)})}, runtime = { @SubsystemItemDefinition(presenter =
ProfileNameTokens.MAIN_PAGE, name = ItemMenuProfileText.PICKETLINK) })
+@SubsystemExtension(@SubsystemGroupDefinition(subsystem="picketlink", name =
ItemMenuProfileText.PICKETLINK, items = {
+ @SubsystemItemDefinition(presenter = ProfileNameTokens.FEDERATION, name =
ItemMenuProfileText.FEDERATION)}))
@GinModules(PicketLinkClientModule.class)
public interface PicketLinkGinjector extends Ginjector {
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationDetails.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationDetails.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationDetails.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -32,7 +32,7 @@
import org.jboss.ballroom.client.widgets.forms.TextItem;
import org.jboss.ballroom.client.widgets.tools.ToolButton;
import org.jboss.dmr.client.ModelNode;
-import org.picketlink.as.console.client.shared.model.Federation;
+import org.picketlink.as.console.client.shared.subsys.model.Federation;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.client.ui.ScrollPanel;
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationEditor.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationEditor.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationEditor.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -35,13 +35,14 @@
import org.jboss.ballroom.client.widgets.tools.ToolButton;
import org.jboss.ballroom.client.widgets.tools.ToolStrip;
import org.jboss.ballroom.client.widgets.window.Feedback;
-import org.picketlink.as.console.client.shared.model.Federation;
+import org.picketlink.as.console.client.shared.subsys.model.Federation;
import com.google.gwt.dom.client.Style;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -148,19 +149,10 @@
// -----------------
- final FormToolStrip.FormCallback<DataSource> formCallback = new
FormToolStrip.FormCallback<DataSource>() {
- @Override
- public void onSave(Map<String, Object> changeset) {
- Federation ds = getCurrentSelection();
- presenter.onSaveFederationDetails(ds.getAlias(), changeset);
- }
-
- @Override
- public void onDelete(DataSource entity) {
- // n/a
- }
- };
-
+ bottomPanel.add(new SimplePanel(), "Identity Provider");
+ bottomPanel.add(new SimplePanel(), "Service Providers");
+ bottomPanel.add(new SimplePanel(), "Digital Certificates");
+
bottomPanel.selectTab(0);
// -----------------
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationPresenter.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationPresenter.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationPresenter.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -21,15 +21,16 @@
*/
package org.picketlink.as.console.client.profile.ui;
-import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import org.jboss.as.console.client.domain.model.SimpleCallback;
import org.jboss.as.console.client.shared.subsys.RevealStrategy;
import org.jboss.ballroom.client.layout.LHSHighlightEvent;
import org.picketlink.as.console.client.BeanFactory;
import org.picketlink.as.console.client.ProfileNameTokens;
-import org.picketlink.as.console.client.shared.model.Federation;
+import org.picketlink.as.console.client.shared.subsys.model.Federation;
+import org.picketlink.as.console.client.shared.subsys.model.FederationStore;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.event.shared.EventBus;
@@ -62,15 +63,17 @@
private final PlaceManager placeManager;
private final RevealStrategy revealStrategy;
private final BeanFactory beanFactory;
+ private FederationStore federationStore;
@Inject
public FederationPresenter(final EventBus eventBus, BeanFactory beanFactory, final
MyView view, final MyProxy proxy,
- final PlaceManager placeManager, RevealStrategy revealStrategy) {
+ final PlaceManager placeManager, RevealStrategy revealStrategy,
FederationStore federationStore) {
super(eventBus, view, proxy);
this.placeManager = placeManager;
this.revealStrategy = revealStrategy;
this.beanFactory = beanFactory;
+ this.federationStore = federationStore;
}
@Override
@@ -97,20 +100,12 @@
@Override
protected void onReset() {
super.onReset();
- ArrayList<Federation> federations = new ArrayList<Federation>();
-
- Federation federation1 = this.beanFactory.federation().as();
-
- federation1.setAlias("federation-01");
-
- Federation federation2 = this.beanFactory.federation().as();
-
- federation2.setAlias("federation-02");
-
- federations.add(federation1);
- federations.add(federation2);
-
- getView().updateFederations(federations);
+ this.federationStore.loadFederations(new
SimpleCallback<List<Federation>>() {
+ @Override
+ public void onSuccess(List<Federation> result) {
+ getView().updateFederations(result);
+ }
+ });
}
/**
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationTable.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationTable.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationTable.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -24,7 +24,7 @@
import org.jboss.ballroom.client.widgets.tables.DefaultCellTable;
import org.jboss.ballroom.client.widgets.tables.DefaultPager;
-import org.picketlink.as.console.client.shared.model.Federation;
+import org.picketlink.as.console.client.shared.subsys.model.Federation;
import com.google.gwt.user.cellview.client.TextColumn;
import com.google.gwt.user.client.ui.VerticalPanel;
Modified:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationView.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationView.java 2012-03-14
23:56:06 UTC (rev 1506)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationView.java 2012-03-14
23:56:35 UTC (rev 1507)
@@ -27,7 +27,7 @@
import org.jboss.as.console.client.Console;
import org.jboss.as.console.client.core.SuspendableViewImpl;
import org.jboss.as.console.client.widgets.tabs.DefaultTabLayoutPanel;
-import org.picketlink.as.console.client.shared.model.Federation;
+import org.picketlink.as.console.client.shared.subsys.model.Federation;
import com.google.gwt.dom.client.Style;
import com.google.gwt.user.client.ui.Widget;