Picketlink SVN: r1470 - console/trunk.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-02 10:22:28 -0500 (Fri, 02 Mar 2012)
New Revision: 1470
Modified:
console/trunk/README.txt
Log:
Removed the Important note.
Modified: console/trunk/README.txt
===================================================================
--- console/trunk/README.txt 2012-03-02 15:21:50 UTC (rev 1469)
+++ console/trunk/README.txt 2012-03-02 15:22:28 UTC (rev 1470)
@@ -1,7 +1,7 @@
Running in hosted mode:
----------------------
-1.) Make sure you build the top level module first. Also, see the "Important" section below.
+1.) Make sure you build the top level module first.
2.) cd 'gui'
@@ -11,16 +11,4 @@
When the hosted browser is started, it's enough to hit the 'refresh' button to recompile
and verify changes. You can get the OOPHM Plugin, required for attaching your browser to the
-hosted mode execution here: http://gwt.google.com/samples/MissingPlugin/MissingPlugin.html
-
-Important:
-----------------------
-
-This projects uses the Ballroom project. A small change was made in class org.jboss.ballroom.client.widgets.window.DialogueOptions to get the instance
-of the submit button:
-
- public DefaultButton getSubmit() {
- return this.submit;
- }
-
-This change will be discussed with the Ballroom team. Meanwhile, consider the jar file located in gui/src/main/webapp/WEB-INF/lib.
\ No newline at end of file
+hosted mode execution here: http://gwt.google.com/samples/MissingPlugin/MissingPlugin.html
\ No newline at end of file
12 years, 9 months
Picketlink SVN: r1469 - console/trunk/gui/src/main/java/org/picketlink/console/client/view/security.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-02 10:21:50 -0500 (Fri, 02 Mar 2012)
New Revision: 1469
Modified:
console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java
console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java
Log:
Changed the submit clickhandler construction.
Modified: console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java 2012-03-02 00:45:48 UTC (rev 1468)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java 2012-03-02 15:21:50 UTC (rev 1469)
@@ -49,7 +49,7 @@
Credentials getUserCredentials();
- HasClickHandlers getLoginClickHandlers();
+ void setLoginClickHandlers(ClickHandler clickHandler);
void resetAndFocus();
@@ -78,12 +78,12 @@
@Override
protected void onBind() {
super.onBind();
- registerHandler(getView().getLoginClickHandlers().addClickHandler(new ClickHandler() {
+ getView().setLoginClickHandlers(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
authenticate();
}
- }));
+ });
}
@Override
Modified: console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java 2012-03-02 00:45:48 UTC (rev 1468)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java 2012-03-02 15:21:50 UTC (rev 1469)
@@ -26,13 +26,11 @@
import org.jboss.ballroom.client.widgets.window.DefaultWindow;
import org.jboss.ballroom.client.widgets.window.DialogueOptions;
import org.jboss.ballroom.client.widgets.window.WindowContentBuilder;
-import org.picketlink.console.client.model.BeanFactory;
import org.picketlink.console.client.model.Credentials;
import org.picketlink.console.client.resources.MessagesFactory;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -45,8 +43,6 @@
*/
public class LoginView extends ViewImpl implements LoginPresenter.MyView {
- private BeanFactory beanFactory;
-
private DefaultWindow window;
private DialogueOptions options;
private Form<Credentials> form;
@@ -54,37 +50,22 @@
private TextBoxItem passwordTextbox;
@Inject
- public LoginView(BeanFactory factory) {
- this.beanFactory = factory;
- this.window = new DefaultWindow("Login");
- this.options = new DialogueOptions(MessagesFactory.instance().OK(), new ClickHandler() {
-
- @Override
- public void onClick(ClickEvent event) {
-
- }
- }, "cancel", new ClickHandler() {
-
- @Override
- public void onClick(ClickEvent event) {
-
- }
- });
-
- window.setWidget(new WindowContent().asWidget());
-
- window.setWidth(480);
- window.setHeight(230);
- window.setModal(true);
-
- window.setGlassEnabled(false);
-
- window.center();
+ public LoginView() {
}
@Override
public Widget asWidget() {
- return window;
+ this.window = new DefaultWindow("Login");
+
+ this.window.setWidth(480);
+ this.window.setHeight(230);
+ this.window.setModal(true);
+
+ this.window.setGlassEnabled(false);
+
+ this.window.setWidget(new WindowContent().asWidget());
+
+ return this.window;
}
public Credentials getUserCredentials() {
@@ -92,8 +73,14 @@
}
@Override
- public HasClickHandlers getLoginClickHandlers() {
- return this.options.getSubmit();
+ public void setLoginClickHandlers(ClickHandler clickHandler) {
+ this.options = new DialogueOptions(MessagesFactory.instance().OK(), clickHandler, "cancel", new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+
+ }
+ });
}
@Override
12 years, 9 months
Picketlink SVN: r1468 - console/trunk.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 19:45:48 -0500 (Thu, 01 Mar 2012)
New Revision: 1468
Modified:
console/trunk/README.txt
Log:
Informations added.
Modified: console/trunk/README.txt
===================================================================
--- console/trunk/README.txt 2012-03-02 00:43:09 UTC (rev 1467)
+++ console/trunk/README.txt 2012-03-02 00:45:48 UTC (rev 1468)
@@ -1,7 +1,7 @@
Running in hosted mode:
----------------------
-1.) Make sure you build the top level module first.
+1.) Make sure you build the top level module first. Also, see the "Important" section below.
2.) cd 'gui'
@@ -12,3 +12,15 @@
When the hosted browser is started, it's enough to hit the 'refresh' button to recompile
and verify changes. You can get the OOPHM Plugin, required for attaching your browser to the
hosted mode execution here: http://gwt.google.com/samples/MissingPlugin/MissingPlugin.html
+
+Important:
+----------------------
+
+This projects uses the Ballroom project. A small change was made in class org.jboss.ballroom.client.widgets.window.DialogueOptions to get the instance
+of the submit button:
+
+ public DefaultButton getSubmit() {
+ return this.submit;
+ }
+
+This change will be discussed with the Ballroom team. Meanwhile, consider the jar file located in gui/src/main/webapp/WEB-INF/lib.
\ No newline at end of file
12 years, 9 months
Picketlink SVN: r1467 - in console/trunk/gui/src/main/webapp/WEB-INF: lib and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 19:43:09 -0500 (Thu, 01 Mar 2012)
New Revision: 1467
Added:
console/trunk/gui/src/main/webapp/WEB-INF/lib/
console/trunk/gui/src/main/webapp/WEB-INF/lib/widgets-1.1.0-SNAPSHOT.jar
Log:
This projects uses the Ballroom project. A small change was made in class org.jboss.ballroom.client.widgets.window.DialogueOptions to get the instance
of the submit button:
public DefaultButton getSubmit() {
return this.submit;
}
This change will be discussed with the Ballroom team. Meanwhile, consider the jar file located in gui/src/main/webapp/WEB-INF/lib.
Added: console/trunk/gui/src/main/webapp/WEB-INF/lib/widgets-1.1.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/webapp/WEB-INF/lib/widgets-1.1.0-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 9 months
Picketlink SVN: r1466 - console/trunk.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 19:08:41 -0500 (Thu, 01 Mar 2012)
New Revision: 1466
Added:
console/trunk/README.txt
Log:
Initial commit.
Added: console/trunk/README.txt
===================================================================
--- console/trunk/README.txt (rev 0)
+++ console/trunk/README.txt 2012-03-02 00:08:41 UTC (rev 1466)
@@ -0,0 +1,14 @@
+Running in hosted mode:
+----------------------
+
+1.) Make sure you build the top level module first.
+
+2.) cd 'gui'
+
+Start the GWT shell with
+
+ mvn gwt:<run|debug>
+
+When the hosted browser is started, it's enough to hit the 'refresh' button to recompile
+and verify changes. You can get the OOPHM Plugin, required for attaching your browser to the
+hosted mode execution here: http://gwt.google.com/samples/MissingPlugin/MissingPlugin.html
12 years, 9 months
Picketlink SVN: r1465 - console/trunk/gui.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 18:59:24 -0500 (Thu, 01 Mar 2012)
New Revision: 1465
Modified:
console/trunk/gui/
Log:
Property changes on: console/trunk/gui
___________________________________________________________________
Added: svn:ignore
+ .classpath
.project
.gwt
.settings
war
12 years, 9 months
Picketlink SVN: r1464 - in console/trunk: ide-configs and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 18:55:37 -0500 (Thu, 01 Mar 2012)
New Revision: 1464
Added:
console/trunk/ide-configs/
console/trunk/ide-configs/README.txt
console/trunk/pom.xml
Log:
Added: console/trunk/ide-configs/README.txt
===================================================================
--- console/trunk/ide-configs/README.txt (rev 0)
+++ console/trunk/ide-configs/README.txt 2012-03-01 23:55:37 UTC (rev 1464)
@@ -0,0 +1 @@
+Please, use the configurations provided by the JBoss AS 7 Project.
\ No newline at end of file
Added: console/trunk/pom.xml
===================================================================
--- console/trunk/pom.xml (rev 0)
+++ console/trunk/pom.xml 2012-03-01 23:55:37 UTC (rev 1464)
@@ -0,0 +1,209 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-console-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>PicketLink Console Parent Project</name>
+ <description>PicketLink is a cross-cutting project that handles identity needs for the JEMS projects</description>
+
+ <url>
+ https://svn.jboss.org/repos/picketlink/console/
+ </url>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/picketlink/console/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/picketlink/console/trunk</developerConnection>
+ </scm>
+
+ <organization>
+ <name>JBoss, a division of Red Hat</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+
+ <!-- IssueManagement -->
+ <issueManagement>
+ <system>jira</system>
+ <url>https://issues.jboss.org/browse/PLCONSOLE</url>
+ </issueManagement>
+
+ <!-- licenses -->
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+
+ <properties>
+ <gwt.version>2.3.0</gwt.version>
+ <gwtp.version>0.6</gwtp.version>
+ <gin.version>1.5_past22</gin.version>
+ <guice.version>3.0</guice.version>
+ <ballroom.version>1.1.0-SNAPSHOT</ballroom.version>
+ </properties>
+
+ <modules>
+ <module>gui</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- GWT Common Dependencies -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>${gwt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>${gwt.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- GWTP Dependencies -->
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-mvp-client</artifactId>
+ <version>${gwtp.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-dispatch-server</artifactId>
+ <version>${gwtp.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-dispatch-server-guice</artifactId>
+ <version>${gwtp.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-dispatch-client</artifactId>
+ <version>${gwtp.version}</version>
+ <scope>provided</scope> <!-- Remove for GWTP 0.5.1 and earlier -->
+ </dependency>
+
+
+ <!-- GWT DI Dependencies -->
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-servlet</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.gwt.inject</groupId>
+ <artifactId>gin</artifactId>
+ <version>${gin.version}</version>
+ </dependency>
+
+ <!-- JBoss Ballroom Dependencies -->
+ <dependency>
+ <groupId>org.jboss.ballroom</groupId>
+ <artifactId>widgets</artifactId>
+ <version>${ballroom.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <showDeprecation>false</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <failIfNoTests>false</failIfNoTests>
+ <trimStackTrace>false</trimStackTrace>
+ <systemProperties>
+ <property>
+ <name>log4j.output.dir</name>
+ <value>${project.build.directory}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/picketlink/console/trunk/tags</tagBase>
+ <connectionUrl>scm:svn:https://svn.jboss.org/repos/picketlink/console/trunk</connectionUrl>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- Repositories -->
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>gwtplatform.plugin</id>
+ <name>Gwtplatform custom plugin repository</name>
+ <url>http://maven.gwt-platform.googlecode.com/hg/</url>
+ <layout>default</layout>
+ </pluginRepository>
+ </pluginRepositories>
+
+</project>
12 years, 9 months
Picketlink SVN: r1463 - in console/trunk/gui: src and 26 other directories.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 18:55:16 -0500 (Thu, 01 Mar 2012)
New Revision: 1463
Added:
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/console/
console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml
console/trunk/gui/src/main/java/org/picketlink/console/client/
console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java
console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsoleFramework.java
console/trunk/gui/src/main/java/org/picketlink/console/client/gin/
console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkGinjector.java
console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkModule.java
console/trunk/gui/src/main/java/org/picketlink/console/client/model/
console/trunk/gui/src/main/java/org/picketlink/console/client/model/BeanFactory.java
console/trunk/gui/src/main/java/org/picketlink/console/client/model/Credentials.java
console/trunk/gui/src/main/java/org/picketlink/console/client/place/
console/trunk/gui/src/main/java/org/picketlink/console/client/place/DefaultPlace.java
console/trunk/gui/src/main/java/org/picketlink/console/client/place/NameTokens.java
console/trunk/gui/src/main/java/org/picketlink/console/client/place/PicketLinkPlaceManager.java
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/ImageFactory.java
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/Images.java
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.java
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.properties
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessagesFactory.java
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/close.gif
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/login.gif
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/picketlink-banner-1180px.png
console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/user.png
console/trunk/gui/src/main/java/org/picketlink/console/client/security/
console/trunk/gui/src/main/java/org/picketlink/console/client/security/SecurityManager.java
console/trunk/gui/src/main/java/org/picketlink/console/client/view/
console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPagePresenter.java
console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPageView.java
console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/
console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java
console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java
console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/
console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/
console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MainPanelWidget.java
console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MenuTreeWidget.java
console/trunk/gui/src/main/java/org/picketlink/console/server/
console/trunk/gui/src/main/java/org/picketlink/console/server/guice/
console/trunk/gui/src/main/java/org/picketlink/console/server/guice/DispatchServletModule.java
console/trunk/gui/src/main/java/org/picketlink/console/server/guice/GuiceServletConfig.java
console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServerModule.java
console/trunk/gui/src/main/java/org/picketlink/console/shared/
console/trunk/gui/src/main/resources/
console/trunk/gui/src/main/resources/org/
console/trunk/gui/src/main/resources/org/picketlink/
console/trunk/gui/src/main/resources/org/picketlink/console/
console/trunk/gui/src/main/resources/org/picketlink/console/public/
console/trunk/gui/src/main/resources/org/picketlink/console/public/images/
console/trunk/gui/src/main/resources/org/picketlink/console/public/images/close.gif
console/trunk/gui/src/main/resources/org/picketlink/console/public/images/login.gif
console/trunk/gui/src/main/resources/org/picketlink/console/public/images/picketlink-banner-1180px.png
console/trunk/gui/src/main/resources/org/picketlink/console/public/images/user.png
console/trunk/gui/src/main/webapp/
console/trunk/gui/src/main/webapp/PicketLinkConsole.html
console/trunk/gui/src/main/webapp/WEB-INF/
console/trunk/gui/src/main/webapp/WEB-INF/web.xml
console/trunk/gui/src/main/webapp/picketlink-console.css
Log:
Added: console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<module rename-to='PicketLinkConsole'>
+ <!-- Inherit the core Web Toolkit stuff. -->
+ <inherits name='com.google.gwt.user.User'/>
+ <inherits name='com.google.gwt.inject.Inject'/>
+ <inherits name='com.google.gwt.resources.Resources'/>
+
+ <!-- Inherit the default GWT style sheet. You can change -->
+ <!-- the theme of your GWT application by uncommenting -->
+ <!-- any one of the following lines. -->
+<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
+ <inherits name='com.google.gwt.user.theme.chrome.Chrome'/>
+ <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
+
+ <!-- Other module inherits -->
+ <inherits name='com.gwtplatform.mvp.Mvp'/>
+ <inherits name='com.gwtplatform.dispatch.Dispatch'/>
+
+ <!-- Ballroom -->
+ <inherits name="org.jboss.ballroom.Framework_RH"/>
+ <replace-with class="org.picketlink.console.client.PicketLinkConsoleFramework">
+ <when-type-is class="org.jboss.ballroom.client.spi.Framework"/>
+ </replace-with>
+
+ <!-- Specify the app entry point class. -->
+ <entry-point class='org.picketlink.console.client.PicketLinkConsole'/>
+
+ <!-- Specify the paths for translatable code -->
+ <source path='client'/>
+ <source path='shared'/>
+
+ <define-configuration-property name='gin.ginjector' is-multi-valued='false' />
+ <set-configuration-property name='gin.ginjector' value='org.picketlink.console.client.gin.PicketLinkGinjector' />
+
+</module>
\ No newline at end of file
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,77 @@
+/*
+* 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.console.client;
+
+import org.picketlink.console.client.gin.PicketLinkGinjector;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.RunAsyncCallback;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.user.client.Window;
+import com.gwtplatform.mvp.client.DelayedBindRegistry;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class PicketLinkConsole implements EntryPoint {
+
+ public static final PicketLinkGinjector MODULES = GWT.create(PicketLinkGinjector.class);
+
+ @Override
+ public void onModuleLoad() {
+ // This is required for Gwt-Platform proxy's generator
+ DelayedBindRegistry.bind(MODULES);
+
+ // final Image loadingImage = new Image(
+ // "/PicketLinkConsole/images/loading_lite.gif");
+ // loadingImage.getElement().setAttribute("style",
+ // "margin-top:200px;margin-left:auto;margin-right:auto;");
+ //
+ // RootLayoutPanel.get().add(loadingImage);
+
+ Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
+ @Override
+ public void execute() {
+ onModuleLoad2();
+ }
+ });
+ }
+
+ private void onModuleLoad2() {
+ GWT.runAsync(new RunAsyncCallback() {
+ public void onFailure(Throwable caught) {
+ Window.alert("Code download failed");
+ }
+
+ public void onSuccess() {
+ // DelayedBindRegistry.bind(MODULES);
+
+ // RootLayoutPanel.get().remove(loadingImage);
+
+ MODULES.getPlaceManager().revealDefaultPlace();
+ }
+ });
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsoleFramework.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsoleFramework.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsoleFramework.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,55 @@
+/*
+* 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.console.client;
+
+
+import org.jboss.ballroom.client.spi.Framework;
+import org.picketlink.console.client.model.BeanFactory;
+
+import com.google.gwt.autobean.shared.AutoBeanFactory;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.shared.EventBus;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class PicketLinkConsoleFramework implements Framework {
+
+ private final static BeanFactory factory = GWT.create(BeanFactory.class);
+
+ @Override
+ public EventBus getEventBus() {
+ return PicketLinkConsole.MODULES.getEventBus();
+ }
+
+ @Override
+ public PlaceManager getPlaceManager() {
+ return PicketLinkConsole.MODULES.getPlaceManager();
+ }
+
+ @Override
+ public AutoBeanFactory getBeanFactory() {
+ return factory;
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkGinjector.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkGinjector.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkGinjector.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,48 @@
+/*
+* 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.console.client.gin;
+
+import org.picketlink.console.client.view.MainPagePresenter;
+import org.picketlink.console.client.view.security.LoginPresenter;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.inject.client.GinModules;
+import com.google.gwt.inject.client.Ginjector;
+import com.google.inject.Provider;
+import com.gwtplatform.dispatch.client.gin.DispatchAsyncModule;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+@GinModules({ DispatchAsyncModule.class, PicketLinkModule.class })
+public interface PicketLinkGinjector extends Ginjector {
+
+ EventBus getEventBus();
+
+ PlaceManager getPlaceManager();
+
+ Provider<MainPagePresenter> getMainPagePresenter();
+
+ Provider<LoginPresenter> getLoginPresenter();
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkModule.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkModule.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/gin/PicketLinkModule.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,52 @@
+/*
+* 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.console.client.gin;
+
+import org.picketlink.console.client.place.DefaultPlace;
+import org.picketlink.console.client.place.NameTokens;
+import org.picketlink.console.client.place.PicketLinkPlaceManager;
+import org.picketlink.console.client.view.MainPagePresenter;
+import org.picketlink.console.client.view.MainPageView;
+import org.picketlink.console.client.view.security.LoginPresenter;
+import org.picketlink.console.client.view.security.LoginView;
+
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+import com.gwtplatform.mvp.client.gin.DefaultModule;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class PicketLinkModule extends AbstractPresenterModule {
+
+ @Override
+ protected void configure() {
+ install(new DefaultModule(PicketLinkPlaceManager.class));
+
+ bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.login);
+
+ bindPresenter(LoginPresenter.class, LoginPresenter.MyView.class, LoginView.class, LoginPresenter.MyProxy.class);
+
+ bindPresenter(MainPagePresenter.class, MainPagePresenter.MyView.class, MainPageView.class,
+ MainPagePresenter.MyProxy.class);
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/model/BeanFactory.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/model/BeanFactory.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/model/BeanFactory.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,34 @@
+/*
+* 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.console.client.model;
+
+import com.google.gwt.autobean.shared.AutoBean;
+import com.google.gwt.autobean.shared.AutoBeanFactory;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public interface BeanFactory extends AutoBeanFactory {
+
+ AutoBean<Credentials> credentials();
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/model/Credentials.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/model/Credentials.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/model/Credentials.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,38 @@
+/*
+* 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.console.client.model;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public interface Credentials {
+
+ String getUserName();
+
+ void setUsername(String userName);
+
+ String getPassword();
+
+ void setPassword(String password);
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/place/DefaultPlace.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/place/DefaultPlace.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/place/DefaultPlace.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,42 @@
+/*
+* 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.console.client.place;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import com.google.inject.BindingAnnotation;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+@BindingAnnotation
+@Target({ FIELD, PARAMETER, METHOD })
+@Retention(RUNTIME)
+public @interface DefaultPlace {
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/place/NameTokens.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/place/NameTokens.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/place/NameTokens.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,45 @@
+/*
+* 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.console.client.place;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class NameTokens {
+
+ public static final String main = "main";
+ public static final String response = "response";
+ public static final String login = "login";
+
+ public static String getMain() {
+ return main;
+ }
+
+ public static String getResponse() {
+ return response;
+ }
+
+ public static String getLogin() {
+ return login;
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/place/PicketLinkPlaceManager.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/place/PicketLinkPlaceManager.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/place/PicketLinkPlaceManager.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,49 @@
+/*
+* 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.console.client.place;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.proxy.PlaceManagerImpl;
+import com.gwtplatform.mvp.client.proxy.PlaceRequest;
+import com.gwtplatform.mvp.client.proxy.TokenFormatter;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class PicketLinkPlaceManager extends PlaceManagerImpl {
+
+ private final PlaceRequest defaultPlaceRequest;
+
+ @Inject
+ public PicketLinkPlaceManager(final EventBus eventBus, final TokenFormatter tokenFormatter,
+ @DefaultPlace final String defaultPlaceNameToken) {
+ super(eventBus, tokenFormatter);
+ this.defaultPlaceRequest = new PlaceRequest(defaultPlaceNameToken);
+ }
+
+ @Override
+ public void revealDefaultPlace() {
+ revealPlace(defaultPlaceRequest, false);
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/ImageFactory.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/resources/ImageFactory.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/ImageFactory.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,46 @@
+/*
+* 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.console.client.resources;
+
+import com.google.gwt.core.client.GWT;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class ImageFactory {
+
+ private static Images instance;
+
+ private ImageFactory() {
+
+ }
+
+ public static final Images instance() {
+ if (instance == null) {
+ instance = GWT.create( Images.class );
+ }
+
+ return instance;
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/Images.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/resources/Images.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/Images.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,45 @@
+/*
+* 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.console.client.resources;
+
+import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.ImageResource;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public interface Images extends ClientBundle {
+
+ @Source ("images/login.gif")
+ ImageResource login();
+
+ @Source ("images/close.gif")
+ ImageResource close();
+
+ @Source ("images/user.png")
+ ImageResource user();
+
+ @Source ("images/picketlink-banner-1180px.png")
+ ImageResource banner();
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,41 @@
+/*
+* 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.console.client.resources;
+
+import com.google.gwt.i18n.client.Messages;
+import com.google.gwt.safehtml.shared.SafeHtml;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public interface MessageConstants extends Messages {
+
+ String UserName();
+ String Password();
+ String OK();
+ String Login();
+ String Authenticating();
+ String IncorrectUsernameOrPassword();
+ String LoginWelcomeMessage();
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.properties
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.properties (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.properties 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,7 @@
+UserName=User:
+Password=Password:
+OK=OK
+Login=Login
+Authenticating=Authenticating
+IncorrectUsernameOrPassword=Incorrect user name or password
+LoginWelcomeMessage=Welcome to PicketLink Administration Console. Please, enter your credentials:
\ No newline at end of file
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessagesFactory.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessagesFactory.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessagesFactory.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,46 @@
+/*
+* 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.console.client.resources;
+
+import com.google.gwt.core.client.GWT;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class MessagesFactory {
+
+ private static MessageConstants instance;
+
+ private MessagesFactory() {
+
+ }
+
+ public static final MessageConstants instance() {
+ if (instance == null) {
+ instance = GWT.create( MessageConstants.class );
+ }
+
+ return instance;
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/close.gif
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/close.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/login.gif
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/login.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/picketlink-banner-1180px.png
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/picketlink-banner-1180px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/user.png
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/client/resources/images/user.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/security/SecurityManager.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/security/SecurityManager.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/security/SecurityManager.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,55 @@
+/*
+* 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.console.client.security;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class SecurityManager {
+
+ private static SecurityManager instance;
+
+ private SecurityManager() {
+
+ }
+
+ public static SecurityManager instance() {
+ if (instance == null) {
+ instance = new SecurityManager();
+ }
+
+ return instance;
+ }
+
+ public boolean login(String userName, String password) {
+// if (userName != null && userName.equals("admin")) {
+ return true;
+// }
+
+// return false;
+ }
+
+ public String getCurrentUser() {
+ return "admin";
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPagePresenter.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPagePresenter.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPagePresenter.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,75 @@
+/*
+* 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.console.client.view;
+
+import org.picketlink.console.client.place.NameTokens;
+
+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.ProxyStandard;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+import com.gwtplatform.mvp.client.proxy.ProxyPlace;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class MainPagePresenter extends Presenter<MainPagePresenter.MyView, MainPagePresenter.MyProxy> {
+
+ public interface MyView extends View {
+
+ }
+
+ @ProxyStandard
+ @NameToken(NameTokens.main)
+ public interface MyProxy extends ProxyPlace<MainPagePresenter> {
+ }
+
+ private final PlaceManager placeManager;
+
+ @Inject
+ public MainPagePresenter(final EventBus eventBus, final MyView view, final MyProxy proxy, final PlaceManager placeManager) {
+ super(eventBus, view, proxy);
+
+ this.placeManager = placeManager;
+ }
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+
+ @Override
+ protected void onBind() {
+ super.onBind();
+ }
+
+ @Override
+ protected void onReset() {
+ super.onReset();
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPageView.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPageView.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPageView.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,45 @@
+/*
+* 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.console.client.view;
+
+import org.picketlink.console.client.widgets.common.MainPanelWidget;
+
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class MainPageView extends ViewImpl implements MainPagePresenter.MyView {
+
+ @Inject
+ public MainPageView() {
+ }
+
+ @Override
+ public Widget asWidget() {
+ return new MainPanelWidget();
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,115 @@
+/*
+* 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.console.client.view.security;
+
+import org.picketlink.console.client.model.Credentials;
+import org.picketlink.console.client.place.NameTokens;
+import org.picketlink.console.client.security.SecurityManager;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+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.ProxyStandard;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+import com.gwtplatform.mvp.client.proxy.PlaceRequest;
+import com.gwtplatform.mvp.client.proxy.ProxyPlace;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class LoginPresenter extends Presenter<LoginPresenter.MyView, LoginPresenter.MyProxy> {
+
+ public interface MyView extends View {
+
+ Credentials getUserCredentials();
+
+ HasClickHandlers getLoginClickHandlers();
+
+ void resetAndFocus();
+
+ void setError(String errorText);
+ }
+
+ @ProxyStandard
+ @NameToken(NameTokens.login)
+ public interface MyProxy extends ProxyPlace<LoginPresenter> {
+ }
+
+ private final PlaceManager placeManager;
+
+ @Inject
+ public LoginPresenter(final EventBus eventBus, final MyView view, final MyProxy proxy, final PlaceManager placeManager) {
+ super(eventBus, view, proxy);
+
+ this.placeManager = placeManager;
+ }
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+
+ @Override
+ protected void onBind() {
+ super.onBind();
+ registerHandler(getView().getLoginClickHandlers().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ authenticate();
+ }
+ }));
+ }
+
+ @Override
+ protected void onReset() {
+ super.onReset();
+ getView().resetAndFocus();
+ }
+
+ /**
+ * Send the name from the nameField to the server and wait for a response.
+ */
+ private void authenticate() {
+ getView().setError(null);
+
+ String userName = getView().getUserCredentials().getUserName();
+
+ if (userName == null || userName.trim().isEmpty()) {
+ getView().setError("Please enter at least four characters");
+ return;
+ }
+
+ if (!SecurityManager.instance().login(userName, getView().getUserCredentials().getPassword())) {
+ getView().setError("Invalid credentials.");
+ return;
+ }
+
+ placeManager.revealPlace(new PlaceRequest(NameTokens.main));
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,132 @@
+/*
+* 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.console.client.view.security;
+
+import org.jboss.ballroom.client.widgets.forms.Form;
+import org.jboss.ballroom.client.widgets.forms.TextBoxItem;
+import org.jboss.ballroom.client.widgets.window.DefaultWindow;
+import org.jboss.ballroom.client.widgets.window.DialogueOptions;
+import org.jboss.ballroom.client.widgets.window.WindowContentBuilder;
+import org.picketlink.console.client.model.BeanFactory;
+import org.picketlink.console.client.model.Credentials;
+import org.picketlink.console.client.resources.MessagesFactory;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class LoginView extends ViewImpl implements LoginPresenter.MyView {
+
+ private BeanFactory beanFactory;
+
+ private DefaultWindow window;
+ private DialogueOptions options;
+ private Form<Credentials> form;
+ private TextBoxItem userNameTextbox;
+ private TextBoxItem passwordTextbox;
+
+ @Inject
+ public LoginView(BeanFactory factory) {
+ this.beanFactory = factory;
+ this.window = new DefaultWindow("Login");
+ this.options = new DialogueOptions(MessagesFactory.instance().OK(), new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+
+ }
+ }, "cancel", new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+
+ }
+ });
+
+ window.setWidget(new WindowContent().asWidget());
+
+ window.setWidth(480);
+ window.setHeight(230);
+ window.setModal(true);
+
+ window.setGlassEnabled(false);
+
+ window.center();
+ }
+
+ @Override
+ public Widget asWidget() {
+ return window;
+ }
+
+ public Credentials getUserCredentials() {
+ return this.form.getUpdatedEntity();
+ }
+
+ @Override
+ public HasClickHandlers getLoginClickHandlers() {
+ return this.options.getSubmit();
+ }
+
+ @Override
+ public void resetAndFocus() {
+ this.window.center();
+ }
+
+ @Override
+ public void setError(String errorText) {
+ if (errorText != null) {
+ this.userNameTextbox.setErroneous(true);
+ this.userNameTextbox.setErrMessage(errorText);
+ }
+ }
+
+ class WindowContent {
+ Widget asWidget() {
+
+ VerticalPanel layout = new VerticalPanel();
+
+ layout.add(new HTML(MessagesFactory.instance().LoginWelcomeMessage()));
+
+ form = new Form<Credentials>(Credentials.class);
+
+ userNameTextbox = new TextBoxItem("userName", MessagesFactory.instance().UserName());
+ passwordTextbox = new TextBoxItem("password", MessagesFactory.instance().Password());
+
+ form.setFields(userNameTextbox, passwordTextbox);
+
+ layout.add(form);
+
+ return new WindowContentBuilder(layout, options.showCancel(false)).build();
+
+ }
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MainPanelWidget.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MainPanelWidget.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MainPanelWidget.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,93 @@
+package org.picketlink.console.client.widgets.common;
+
+
+import org.picketlink.console.client.resources.ImageFactory;
+
+import org.picketlink.console.client.security.SecurityManager;
+import com.google.gwt.dom.client.Style.FontWeight;
+import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.DockLayoutPanel;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.StackLayoutPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+public class MainPanelWidget extends DockLayoutPanel {
+
+ private Panel contentPanel = new DecoratorPanel();
+
+ public MainPanelWidget() {
+ super(Unit.EM);
+
+ this.setPixelSize(1015, 500);
+ this.getElement().getStyle().setProperty("border", "5px solid #e7e7e7");
+ this.addNorth(createTopPanel(), 15);
+ this.addSouth(createMainPanel(), 28);
+ }
+
+ private VerticalPanel createTopPanel() {
+ VerticalPanel topPanel = new VerticalPanel();
+
+ topPanel.setPixelSize(1015, 135);
+ topPanel.getElement().getStyle().setBackgroundColor("#e7e7e7");
+ topPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
+
+ topPanel.add(new Image(ImageFactory.instance().banner()));
+ topPanel.add(createStatusPanel());
+
+ return topPanel;
+ }
+
+ private FlexTable createStatusPanel() {
+ FlexTable horizontalPanel = new FlexTable();
+
+ horizontalPanel.setPixelSize(1015, 10);
+
+ horizontalPanel.getFlexCellFormatter().setWidth(0, 1, "25%");
+ horizontalPanel.getFlexCellFormatter().setWidth(0, 2, "6%");
+ horizontalPanel.getFlexCellFormatter().setWidth(0, 3, "69%");
+
+ horizontalPanel.setWidget(0, 0, new Image(ImageFactory.instance().user()));
+ horizontalPanel.setWidget(0, 1, new HTML("You are logged as: " + SecurityManager.instance().getCurrentUser()));
+
+ Label messagesLabel = new Label("Messages: ");
+
+ messagesLabel.getElement().getStyle().setFontWeight(FontWeight.BOLD);
+
+ horizontalPanel.setWidget(0, 2, messagesLabel);
+
+ horizontalPanel.setWidget(0, 3, new Label("There are no system messages."));
+
+ horizontalPanel.setWidget(0, 4, new Anchor("Logout"));
+
+ return horizontalPanel;
+ }
+
+ private SplitLayoutPanel createMainPanel() {
+ SplitLayoutPanel mainPanel = new SplitLayoutPanel(2);
+
+ mainPanel.addWest(createConfigurationMenuPanel(), 300);
+
+ mainPanel.add(this.contentPanel);
+
+ return mainPanel;
+ }
+
+ private StackLayoutPanel createConfigurationMenuPanel() {
+ StackLayoutPanel configMenuPanel = new StackLayoutPanel(Unit.EM);
+
+ configMenuPanel.add(new MenuTreeWidget(this.contentPanel), new Label("Identity Federation"), 1.5);
+ configMenuPanel.add(new HTML("asasa"), new Label("Circle of Trust"), 1.5);
+ configMenuPanel.add(new HTML("asasa"), new Label("Identity Management"), 1.5);
+
+ return configMenuPanel;
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MenuTreeWidget.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MenuTreeWidget.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MenuTreeWidget.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,62 @@
+package org.picketlink.console.client.widgets.common;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+
+public class MenuTreeWidget extends Tree {
+
+ private final Panel contentPanel;
+
+ public MenuTreeWidget(Panel contentPanel) {
+ init();
+ this.contentPanel = contentPanel;
+ }
+
+ private void init() {
+ this.addItem(createSecurityDomainOptions());
+ this.addItem(createIdentityProviderOptions());
+ this.addItem(createServiceProviderOptions());
+ this.addItem(new TreeItem("SAML Configurations"));
+ }
+
+ private TreeItem createSecurityDomainOptions() {
+ TreeItem itemIDP = new TreeItem("Security Domains");
+
+ Anchor newSecurityDomainAnchor = new Anchor("New ...");
+
+ newSecurityDomainAnchor.addClickHandler(new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+ }
+ });
+
+ itemIDP.addItem(newSecurityDomainAnchor);
+ itemIDP.addItem(new Anchor("Search ..."));
+
+ return itemIDP;
+ }
+
+ private TreeItem createIdentityProviderOptions() {
+ TreeItem itemIDP = new TreeItem("Identity Providers");
+
+ itemIDP.addItem(new Anchor("New ..."));
+ itemIDP.addItem(new Anchor("Search ..."));
+
+ return itemIDP;
+ }
+
+ private TreeItem createServiceProviderOptions() {
+ TreeItem itemIDP = new TreeItem("Service Providers");
+
+ itemIDP.addItem(new Anchor("New ..."));
+ itemIDP.addItem(new Anchor("Search ..."));
+
+ return itemIDP;
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/server/guice/DispatchServletModule.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/server/guice/DispatchServletModule.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/guice/DispatchServletModule.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,13 @@
+package org.picketlink.console.server.guice;
+
+import com.google.inject.servlet.ServletModule;
+import com.gwtplatform.dispatch.server.guice.DispatchServiceImpl;
+import com.gwtplatform.dispatch.shared.ActionImpl;
+
+public class DispatchServletModule extends ServletModule {
+
+ @Override
+ public void configureServlets() {
+ serve("/" + ActionImpl.DEFAULT_SERVICE_NAME).with(DispatchServiceImpl.class);
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/server/guice/GuiceServletConfig.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/server/guice/GuiceServletConfig.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/guice/GuiceServletConfig.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,13 @@
+package org.picketlink.console.server.guice;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.servlet.GuiceServletContextListener;
+
+public class GuiceServletConfig extends GuiceServletContextListener {
+
+ @Override
+ protected Injector getInjector() {
+ return Guice.createInjector(new ServerModule(), new DispatchServletModule());
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServerModule.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServerModule.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServerModule.java 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,11 @@
+package org.picketlink.console.server.guice;
+
+import com.gwtplatform.dispatch.server.guice.HandlerModule;
+
+public class ServerModule extends HandlerModule {
+
+ @Override
+ protected void configureHandlers() {
+
+ }
+}
Added: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/close.gif
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/close.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/login.gif
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/login.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/picketlink-banner-1180px.png
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/picketlink-banner-1180px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/user.png
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/resources/org/picketlink/console/public/images/user.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/webapp/PicketLinkConsole.html
===================================================================
--- console/trunk/gui/src/main/webapp/PicketLinkConsole.html (rev 0)
+++ console/trunk/gui/src/main/webapp/PicketLinkConsole.html 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,48 @@
+<!doctype html>
+<!-- The DOCTYPE declaration above will set the -->
+<!-- browser's rendering engine into -->
+<!-- "Standards Mode". Replacing this declaration -->
+<!-- with a "Quirks Mode" doctype may lead to some -->
+<!-- differences in layout. -->
+
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+ <!-- -->
+ <!-- Consider inlining CSS to reduce the number of requested files -->
+ <!-- -->
+ <link type="text/css" rel="stylesheet" href="picketlink-console.css">
+
+ <!-- -->
+ <!-- Any title is fine -->
+ <!-- -->
+ <title>picketlink-console</title>
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script type="text/javascript" language="javascript" src="PicketLinkConsole/PicketLinkConsole.nocache.js"></script>
+ </head>
+
+ <!-- -->
+ <!-- The body can have arbitrary html, or -->
+ <!-- you can leave the body empty if you want -->
+ <!-- to create a completely dynamic UI. -->
+ <!-- -->
+ <body>
+
+ <!-- OPTIONAL: include this if you want history support -->
+ <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position: absolute; width: 0;height: 0; border: 0;"></iframe>
+
+ <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
+ <noscript>
+ <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif;">
+ Your web browser must have JavaScript enabled
+ in order for this application to display correctly.
+ </div>
+ </noscript>
+ </body>
+</html>
\ No newline at end of file
Added: console/trunk/gui/src/main/webapp/WEB-INF/web.xml
===================================================================
--- console/trunk/gui/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ console/trunk/gui/src/main/webapp/WEB-INF/web.xml 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
+ <display-name>picketlink-console</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+ <listener>
+ <listener-class>org.picketlink.console.server.guice.GuiceServletConfig</listener-class>
+ </listener>
+ <filter>
+ <filter-name>guiceFilter</filter-name>
+ <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>guiceFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+</web-app>
\ No newline at end of file
Added: console/trunk/gui/src/main/webapp/picketlink-console.css
===================================================================
--- console/trunk/gui/src/main/webapp/picketlink-console.css (rev 0)
+++ console/trunk/gui/src/main/webapp/picketlink-console.css 2012-03-01 23:55:16 UTC (rev 1463)
@@ -0,0 +1,2 @@
+/* Add css rules here for your application. */
+
12 years, 9 months
Picketlink SVN: r1462 - in console/trunk: gui and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 18:53:50 -0500 (Thu, 01 Mar 2012)
New Revision: 1462
Added:
console/trunk/gui/
console/trunk/gui/pom.xml
Log:
Initial commit.
Added: console/trunk/gui/pom.xml
===================================================================
--- console/trunk/gui/pom.xml (rev 0)
+++ console/trunk/gui/pom.xml 2012-03-01 23:53:50 UTC (rev 1462)
@@ -0,0 +1,115 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-console-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>picketlink-console</artifactId>
+ <packaging>war</packaging>
+
+ <name>PicketLink Console</name>
+ <description>PicketLink Console is the Console for PicketLink</description>
+
+ <dependencies>
+ <!-- GWT Common Dependencies -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- GWTP Dependencies -->
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-mvp-client</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-dispatch-server</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-dispatch-server-guice</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp-dispatch-client</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+
+ <!-- GWT DI Dependencies -->
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-servlet</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.gwt.inject</groupId>
+ <artifactId>gin</artifactId>
+ </dependency>
+
+ <!-- JBoss Ballroom Dependencies -->
+ <dependency>
+ <groupId>org.jboss.ballroom</groupId>
+ <artifactId>widgets</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <version>2.3.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <inplace>true</inplace>
+ <logLevel>TRACE</logLevel>
+ <runTarget>PicketLinkConsole.html</runTarget>
+ <warSourceDirectory>war</warSourceDirectory>
+ <!--bindAddress>192.168.0.12</bindAddress -->
+ <extraJvmArgs>-Xmx512m -DDEBUG</extraJvmArgs>
+ <servicePattern>**/*Service.java</servicePattern>
+ <soyc>false</soyc>
+ <style>OBF</style>
+ <hostedWebapp>war</hostedWebapp>
+ <localWorkers>2</localWorkers>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <warSourceDirectory>src/main/webapp</warSourceDirectory>
+ <webappDirectory>war</webappDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
12 years, 9 months
Picketlink SVN: r1461 - console.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-01 14:35:04 -0500 (Thu, 01 Mar 2012)
New Revision: 1461
Added:
console/trunk/
Log:
12 years, 9 months