Author: pcraveiro
Date: 2012-03-14 01:36:08 -0400 (Wed, 14 Mar 2012)
New Revision: 1500
Added:
console/trunk/gui/
console/trunk/gui/src/
console/trunk/gui/src/main/
console/trunk/gui/src/main/java/
console/trunk/gui/src/main/java/org/
console/trunk/gui/src/main/java/org/picketlink/
console/trunk/gui/src/main/java/org/picketlink/as/
console/trunk/gui/src/main/java/org/picketlink/as/console/
console/trunk/gui/src/main/java/org/picketlink/as/console/PicketLinkConsole.gwt.xml
console/trunk/gui/src/main/java/org/picketlink/as/console/client/
console/trunk/gui/src/main/java/org/picketlink/as/console/client/BeanFactory.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ItemMenuProfileText.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ProfileNameTokens.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/
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/
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/
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
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageEditor.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPagePresenter.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageView.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/shared/
console/trunk/gui/src/main/java/org/picketlink/as/console/client/shared/model/
console/trunk/gui/src/main/java/org/picketlink/as/console/client/shared/model/Federation.java
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ui/
console/trunk/gui/src/main/resources/
console/trunk/gui/src/test/
console/trunk/gui/src/test/java/
console/trunk/gui/src/test/resources/
Log:
First commit.
Added:
console/trunk/gui/src/main/java/org/picketlink/as/console/PicketLinkConsole.gwt.xml
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/as/console/PicketLinkConsole.gwt.xml
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/PicketLinkConsole.gwt.xml 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,23 @@
+<!-- ~ JBoss, Home of Professional Open Source ~ Copyright 2011-2012 Red
+ Hat Inc. and/or its affiliates and other contributors ~ as indicated by the
+ @author tags. All rights reserved. ~ See the copyright.txt in the distribution
+ for a ~ full listing of individual contributors. ~ ~ This copyrighted material
+ is made available to anyone wishing to use, ~ modify, copy, or redistribute
+ it subject to the terms and conditions ~ of the GNU Lesser General Public
+ License, v. 2.1. ~ This program is distributed in the hope that it will be
+ useful, but WITHOUT A ~ WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A ~ PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details. ~ You should have received a copy of the GNU Lesser
+ General Public License, ~ v.2.1 along with this distribution; if not, write
+ to the Free Software ~ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, ~ MA 02110-1301, USA. -->
+
+<module rename-to="PicketLinkConsole">
+
+ <inherits name="org.jboss.as.console.App" />
+
+ <!-- Specify the paths for translatable code -->
+ <source path='client' />
+ <source path='shared' />
+
+</module>
Added: 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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/BeanFactory.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.picketlink.as.console.client;
+
+import org.picketlink.as.console.client.shared.model.Federation;
+
+import com.google.gwt.autobean.shared.AutoBean;
+import com.google.gwt.autobean.shared.AutoBeanFactory;
+
+/**
+ * @author pedroigor
+ * @sice Mar 13, 2012
+ */
+public interface BeanFactory extends AutoBeanFactory {
+
+ /**
+ * @return a new AutoBean<SystemDetails>
+ */
+ AutoBean<Federation> federation();
+}
Added:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ItemMenuProfileText.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ItemMenuProfileText.java
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ItemMenuProfileText.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.picketlink.as.console.client;
+
+/**
+ * Constants for the names of the menu items of the PicketLink profile.
+ *
+ * @author pedroigor
+ * @sice Mar 14, 2012
+ */
+public interface ItemMenuProfileText {
+
+ public static final String PICKETLINK = "PicketLink";
+ public static final String FEDERATION = "Federation";
+
+}
Added:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ProfileNameTokens.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ProfileNameTokens.java
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/ProfileNameTokens.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+package org.picketlink.as.console.client;
+
+/**
+ * NameTokens
+ *
+ * SwitchYard specific path tokens.
+ *
+ * @author Rob Cernich
+ */
+public final class ProfileNameTokens {
+
+ private ProfileNameTokens() {
+ }
+
+ public static final String MAIN_PAGE = "picketlink-main";
+ public static final String FEDERATION = "picletlink-federation";
+
+}
Added:
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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkClientModule.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+package org.picketlink.as.console.client.core.gin;
+
+import org.picketlink.as.console.client.profile.ui.FederationPresenter;
+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 com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+
+
+/**
+ * SwitchYardClientModule
+ *
+ * SwitchYard Ginjector bindings.
+ *
+ * @author Rob Cernich
+ */
+public class PicketLinkClientModule extends AbstractPresenterModule {
+
+ 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);
+ }
+
+}
Added:
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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/core/gin/PicketLinkGinjector.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+package org.picketlink.as.console.client.core.gin;
+
+import org.jboss.as.console.client.shared.SubsystemExtension;
+import org.jboss.as.console.client.shared.SubsystemExtension.SubsystemGroupDefinition;
+import org.jboss.as.console.client.shared.SubsystemExtension.SubsystemItemDefinition;
+import org.picketlink.as.console.client.ItemMenuProfileText;
+import org.picketlink.as.console.client.ProfileNameTokens;
+import org.picketlink.as.console.client.profile.ui.FederationPresenter;
+import org.picketlink.as.console.client.profile.ui.MainPagePresenter;
+
+import com.google.gwt.inject.client.AsyncProvider;
+import com.google.gwt.inject.client.GinModules;
+import com.google.gwt.inject.client.Ginjector;
+
+
+/**
+ * Overall module configuration.
+ *
+ * @see PicketLinkClientModule
+ *
+ * @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) })
+(a)GinModules(PicketLinkClientModule.class)
+public interface PicketLinkGinjector extends Ginjector {
+
+ /**
+ * @return the ConfigPresenter configured for the module.
+ */
+ AsyncProvider<MainPagePresenter> getMainPagePresenter();
+
+ /**
+ * @return the ConfigPresenter configured for the module.
+ */
+ AsyncProvider<FederationPresenter> getFederationPresenter();
+
+}
Added:
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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationDetails.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,134 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.picketlink.as.console.client.profile.ui;
+
+import java.util.Map;
+
+import org.jboss.as.console.client.shared.help.FormHelpPanel;
+import org.jboss.as.console.client.shared.subsys.Baseadress;
+import org.jboss.as.console.client.shared.subsys.jca.model.DataSource;
+import org.jboss.as.console.client.widgets.forms.FormToolStrip;
+import org.jboss.ballroom.client.widgets.forms.Form;
+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 com.google.gwt.user.cellview.client.CellTable;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * @author pedroigor
+ * @sice Mar 14, 2012
+ */
+public class FederationDetails {
+
+ private Form<Federation> form;
+ private FederationPresenter presenter;
+ private ToolButton disableBtn;
+
+ public FederationDetails(FederationPresenter presenter) {
+ this.presenter = presenter;
+ form = new Form(DataSource.class);
+ form.setNumColumns(2);
+
+ /*form.addEditListener(new EditListener<DataSource>() {
+ @Override
+ public void editingBean(DataSource bean) {
+ String nextState = bean.isEnabled() ?
Console.CONSTANTS.common_label_disable():Console.CONSTANTS.common_label_enable();
+ disableBtn.setText(nextState);
+ }
+ });*/
+ }
+
+ public Widget asWidget() {
+ VerticalPanel detailPanel = new VerticalPanel();
+ detailPanel.setStyleName("fill-layout-width");
+
+ FormToolStrip<Federation> toolStrip = new FormToolStrip<Federation>(
+ form,
+ new FormToolStrip.FormCallback<Federation>() {
+ @Override
+ public void onSave(Map<String, Object> changeset) {
+
presenter.onSaveFederationDetails(form.getEditedEntity().getAlias(),
form.getChangedValues());
+ }
+
+ @Override
+ public void onDelete(Federation entity) {
+
+ }
+ });
+
+
+ toolStrip.providesDeleteOp(false);
+
+ /* toolStrip.addToolButtonRight(disableBtn);
+
+ // not available in domain mode
+ if(Console.MODULES.getBootstrapContext().isStandalone())
+ toolStrip.addToolButtonRight(verifyBtn); */
+
+ detailPanel.add(toolStrip.asWidget());
+
+ final TextItem aliasItem = new TextItem("alias", "Alias");
+
+ form.setFields(aliasItem);
+
+ Widget formWidget = form.asWidget();
+
+ final FormHelpPanel helpPanel = new FormHelpPanel(
+ new FormHelpPanel.AddressCallback() {
+ @Override
+ public ModelNode getAddress() {
+ ModelNode address = Baseadress.get();
+ address.add("subsystem", "picketlink");
+ address.add("federation", "*");
+ return address;
+ }
+ }, form
+ );
+
+ detailPanel.add(helpPanel.asWidget());
+
+ detailPanel.add(formWidget);
+
+ ScrollPanel scroll = new ScrollPanel(detailPanel);
+
+ return scroll;
+ }
+
+ public void bind(CellTable<Federation> dataSourceTable) {
+ form.bind(dataSourceTable);
+ }
+
+ public void setEnabled(boolean b) {
+ form.setEnabled(b);
+ }
+
+ public Federation getCurrentSelection() {
+ return form.getEditedEntity();
+ }
+
+}
Added:
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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationEditor.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,198 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.picketlink.as.console.client.profile.ui;
+
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.as.console.client.Console;
+import org.jboss.as.console.client.shared.subsys.jca.model.DataSource;
+import org.jboss.as.console.client.widgets.ContentDescription;
+import org.jboss.as.console.client.widgets.forms.FormToolStrip;
+import org.jboss.ballroom.client.widgets.ContentGroupLabel;
+import org.jboss.ballroom.client.widgets.ContentHeaderLabel;
+import org.jboss.ballroom.client.widgets.tables.DefaultCellTable;
+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 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.TabPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.view.client.SelectionChangeEvent;
+import com.google.gwt.view.client.SingleSelectionModel;
+
+/**
+ * @author pedroigor
+ * @sice Mar 14, 2012
+ */
+public class FederationEditor {
+
+ private FederationPresenter presenter;
+ private FederationTable federationTable;
+ private FederationDetails details;
+
+ public FederationEditor(FederationPresenter presenter) {
+ this.presenter = presenter;
+ }
+
+ public Widget asWidget() {
+
+ LayoutPanel layout = new LayoutPanel();
+
+ ToolStrip topLevelTools = new ToolStrip();
+ topLevelTools.addToolButtonRight(new
ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+ //TODO: launch new federation wizard
+ }
+ }));
+
+
+ ClickHandler clickHandler = new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+
+ final Federation currentSelection = details.getCurrentSelection();
+ if(currentSelection!=null)
+ {
+ Feedback.confirm(
+ Console.MESSAGES.deleteTitle("Federation"),
+ Console.MESSAGES.deleteConfirm("Federation " +
currentSelection.getAlias()),
+ new Feedback.ConfirmationHandler() {
+ @Override
+ public void onConfirmation(boolean isConfirmed) {
+ if (isConfirmed) {
+ presenter.onDelete(currentSelection);
+ }
+ }
+ });
+ }
+ }
+ };
+ ToolButton deleteBtn = new ToolButton(Console.CONSTANTS.common_label_delete());
+ deleteBtn.addClickHandler(clickHandler);
+ topLevelTools.addToolButtonRight(deleteBtn);
+
+ // ----
+
+ VerticalPanel vpanel = new VerticalPanel();
+ vpanel.setStyleName("rhs-content-panel");
+
+ ScrollPanel scroll = new ScrollPanel(vpanel);
+ layout.add(scroll);
+
+ layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);
+
+ // ---
+
+ vpanel.add(new ContentHeaderLabel("Federation"));
+ vpanel.add(new ContentDescription("The PicketLink Federation provides the
configurations for IDPs and SPs given a federation configuration."));
+
+ federationTable = new FederationTable();
+
+
+ vpanel.add(new
ContentGroupLabel(Console.MESSAGES.available("Federations")));
+ vpanel.add(topLevelTools.asWidget());
+ vpanel.add(federationTable.asWidget());
+
+
+ // -----------
+ details = new FederationDetails(presenter);
+ details.bind(federationTable.getCellTable());
+
+ SingleSelectionModel<Federation> selectionModel =
+
(SingleSelectionModel<Federation>)federationTable.getCellTable().getSelectionModel();
+
+ selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler () {
+ @Override
+ public void onSelectionChange(SelectionChangeEvent event) {
+ Federation selectedObject = ((SingleSelectionModel<Federation>)
federationTable.getCellTable().getSelectionModel()).getSelectedObject();
+ details.setEnabled(true);
+ }
+ });
+
+ // -----------------
+
+ TabPanel bottomPanel = new TabPanel();
+ bottomPanel.setStyleName("default-tabpanel");
+
+ bottomPanel.add(details.asWidget(), "Attributes");
+
+ // -----------------
+
+ 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.selectTab(0);
+
+ // -----------------
+
+ vpanel.add(new ContentGroupLabel(Console.CONSTANTS.common_label_selection()));
+
+ vpanel.add(bottomPanel);
+
+ return layout;
+ }
+
+
+ private Federation getCurrentSelection() {
+ Federation ds = ((SingleSelectionModel<Federation>)
federationTable.getCellTable().getSelectionModel()).getSelectedObject();
+ return ds;
+ }
+
+ public void updateDataSources(List<Federation> datasources) {
+
+ federationTable.getDataProvider().setList(datasources);
+
+ final DefaultCellTable<Federation> cellTable =
federationTable.getCellTable();
+ cellTable.selectDefaultEntity();
+ }
+
+ public void setEnabled(boolean isEnabled) {
+
+
+ }
+
+ public void enableDetails(boolean b) {
+ details.setEnabled(b);
+ }
+
+}
Added:
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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationPresenter.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+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.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 com.google.gwt.core.client.Scheduler;
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.annotations.NameToken;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Place;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class FederationPresenter extends Presenter<FederationPresenter.MyView,
FederationPresenter.MyProxy> {
+
+ public interface MyView extends View {
+ void setPresenter(FederationPresenter presenter);
+
+ void updateFederations(List<Federation> federations);
+ }
+
+ @ProxyCodeSplit
+ @NameToken(ProfileNameTokens.FEDERATION)
+ public interface MyProxy extends Proxy<FederationPresenter>, Place {
+ }
+
+ private final PlaceManager placeManager;
+ private final RevealStrategy revealStrategy;
+ private final BeanFactory beanFactory;
+
+ @Inject
+ public FederationPresenter(final EventBus eventBus, BeanFactory beanFactory, final
MyView view, final MyProxy proxy,
+ final PlaceManager placeManager, RevealStrategy revealStrategy) {
+ super(eventBus, view, proxy);
+
+ this.placeManager = placeManager;
+ this.revealStrategy = revealStrategy;
+ this.beanFactory = beanFactory;
+ }
+
+ @Override
+ protected void onReveal() {
+ super.onReveal();
+ Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
+ @Override
+ public void execute() {
+ fireEvent(new LHSHighlightEvent("unused",
"PicketLink", "profiles"));
+ }
+ });
+ }
+
+ @Override
+ protected void revealInParent() {
+ this.revealStrategy.revealInParent(this);
+ }
+
+ @Override
+ protected void onBind() {
+ super.onBind();
+ }
+
+ @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);
+ }
+
+ /**
+ * @param alias
+ * @param changedValues
+ */
+ public void onSaveFederationDetails(String alias, Map<String, Object>
changedValues) {
+ // TODO: on save federation details
+ }
+
+ /**
+ * @param currentSelection
+ */
+ public void onDelete(Federation currentSelection) {
+ // TODO: on delete federation
+ }
+
+}
Added:
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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationTable.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.picketlink.as.console.client.profile.ui;
+
+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 com.google.gwt.user.cellview.client.TextColumn;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.view.client.ListDataProvider;
+import com.google.gwt.view.client.ProvidesKey;
+
+/**
+ * @author pedroigor
+ * @sice Mar 14, 2012
+ */
+public class FederationTable {
+
+ private static final int PAGE_SIZE = 5;
+ private DefaultCellTable<Federation> federationTable;
+ private ListDataProvider<Federation> dataProvider;
+
+ Widget asWidget() {
+
+ VerticalPanel layout = new VerticalPanel();
+ layout.setStyleName("fill-layout-width");
+
+ federationTable = new DefaultCellTable<Federation>(
+ PAGE_SIZE,
+ new ProvidesKey<Federation>() {
+ @Override
+ public Object getKey(Federation item) {
+ return item.getAlias();
+ }
+ });
+
+ dataProvider = new ListDataProvider<Federation>();
+ dataProvider.addDataDisplay(federationTable);
+
+ TextColumn<Federation> aliasColumn = new TextColumn<Federation>() {
+ @Override
+ public String getValue(Federation record) {
+ return record.getAlias();
+ }
+ };
+
+ federationTable.addColumn(aliasColumn, "Name");
+
+ layout.add(federationTable);
+
+ // ---
+ //
http://code.google.com/p/google-web-toolkit/issues/detail?id=4988
+
+ DefaultPager pager = new DefaultPager();
+ pager.setDisplay(federationTable);
+ layout.add(pager);
+
+ return layout;
+ }
+
+ public DefaultCellTable<Federation> getCellTable() {
+ return federationTable;
+ }
+
+ public ListDataProvider<Federation> getDataProvider() {
+ return dataProvider;
+ }
+}
Added:
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
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/FederationView.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.picketlink.as.console.client.profile.ui;
+
+import java.util.List;
+
+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 com.google.gwt.dom.client.Style;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * @author pedroigor
+ * @sice Mar 14, 2012
+ */
+public class FederationView extends SuspendableViewImpl implements
FederationPresenter.MyView {
+
+ private FederationPresenter presenter;
+ private FederationEditor federationEditor;
+
+ @Override
+ public Widget createWidget() {
+
+ this.federationEditor = new FederationEditor(presenter);
+
+ DefaultTabLayoutPanel tabLayoutpanel = new DefaultTabLayoutPanel(40,
Style.Unit.PX);
+ tabLayoutpanel.addStyleName("default-tabpanel");
+
+
+ tabLayoutpanel.add(federationEditor.asWidget(), "PicketLink
Federation", true);
+
+ tabLayoutpanel.selectTab(0);
+
+ return tabLayoutpanel;
+ }
+
+ @Override
+ public void setPresenter(FederationPresenter presenter) {
+ this.presenter = presenter;
+ }
+
+ @Override
+ public void updateFederations(List<Federation> federations) {
+ federationEditor.updateDataSources(federations);
+ }
+
+}
Added:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageEditor.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageEditor.java
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageEditor.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+package org.picketlink.as.console.client.profile.ui;
+
+import org.jboss.ballroom.client.widgets.forms.TextItem;
+
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * ConfigEditor
+ *
+ * Editor widget for SwitchYard system configuration.
+ *
+ * @author Rob Cernich
+ */
+public class MainPageEditor {
+
+ private Panel componentDetails;
+
+ public MainPageEditor() {
+ }
+
+ /**
+ * @return this editor as a Widget.
+ */
+ public Widget asWidget() {
+
+ VerticalPanel layout = new VerticalPanel();
+ layout.setStyleName("fill-layout-width");
+
+ layout.add(new Label("teste"));
+
+ return layout;
+ }
+
+ /**
+ * @param content component specific content.
+ */
+ public void setComponentContent(Widget content) {
+ this.componentDetails.clear();
+
+ if (content != null) {
+ this.componentDetails.add(content);
+ }
+ }
+}
Added:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPagePresenter.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPagePresenter.java
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPagePresenter.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.picketlink.as.console.client.profile.ui;
+
+import org.jboss.as.console.client.shared.subsys.RevealStrategy;
+import org.jboss.ballroom.client.layout.LHSHighlightEvent;
+import org.picketlink.as.console.client.ProfileNameTokens;
+
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.annotations.NameToken;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Place;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class MainPagePresenter extends Presenter<MainPagePresenter.MyView,
MainPagePresenter.MyProxy> {
+
+ public interface MyView extends View {
+
+ }
+
+ @ProxyCodeSplit
+ @NameToken(ProfileNameTokens.MAIN_PAGE)
+ public interface MyProxy extends Proxy<MainPagePresenter>, Place {
+ }
+
+ private final PlaceManager placeManager;
+ private RevealStrategy revealStrategy;
+
+ @Inject
+ public MainPagePresenter(final EventBus eventBus, final MyView view, final MyProxy
proxy, final PlaceManager placeManager, RevealStrategy revealStrategy) {
+ super(eventBus, view, proxy);
+
+ this.placeManager = placeManager;
+ this.revealStrategy = revealStrategy;
+ }
+
+ @Override
+ protected void onReveal() {
+ super.onReveal();
+ Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
+ @Override
+ public void execute() {
+ fireEvent(new LHSHighlightEvent("unused",
"PicketLink",
+ "profiles"));
+ }
+ });
+ }
+
+ @Override
+ protected void revealInParent() {
+ this.revealStrategy.revealInParent(this);
+ }
+
+ @Override
+ protected void onBind() {
+ super.onBind();
+ }
+
+ @Override
+ protected void onReset() {
+ super.onReset();
+ }
+
+}
Added:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageView.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageView.java
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/profile/ui/MainPageView.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
+ * as indicated by the @author tags. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+package org.picketlink.as.console.client.profile.ui;
+
+import org.jboss.as.console.client.core.DisposableViewImpl;
+import org.jboss.as.console.client.shared.viewframework.builder.SimpleLayout;
+
+import com.google.gwt.user.client.ui.Widget;
+
+/**
+ * ConfigView
+ *
+ * View implementation for SwitchYard system configuration.
+ *
+ * @author Rob Cernich
+ */
+public class MainPageView extends DisposableViewImpl implements MainPagePresenter.MyView
{
+
+ private MainPageEditor mainPageEditor;
+
+ @Override
+ public Widget createWidget() {
+ mainPageEditor = new MainPageEditor();
+ SimpleLayout layout = new SimpleLayout().setTitle("PicketLink Subsystem
Details")
+ .setHeadline("Federation
Configuration").setDescription("Displays all federation configurations.")
+ .addContent("Runtime Details", mainPageEditor.asWidget());
+ return layout.build();
+ }
+
+ @Override
+ public void setInSlot(Object slot, Widget content) {
+ this.mainPageEditor.setComponentContent(content);
+ }
+
+}
Added:
console/trunk/gui/src/main/java/org/picketlink/as/console/client/shared/model/Federation.java
===================================================================
---
console/trunk/gui/src/main/java/org/picketlink/as/console/client/shared/model/Federation.java
(rev 0)
+++
console/trunk/gui/src/main/java/org/picketlink/as/console/client/shared/model/Federation.java 2012-03-14
05:36:08 UTC (rev 1500)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.picketlink.as.console.client.shared.model;
+
+import org.jboss.as.console.client.widgets.forms.Address;
+import org.jboss.as.console.client.widgets.forms.Binding;
+
+/**
+ * @author pedroigor
+ * @sice Mar 14, 2012
+ */
+@Address("/subsystem=picketlink/federation={0}")
+public interface Federation {
+
+ @Binding(key = true)
+ String getAlias();
+ void setAlias(String alias);
+
+}