Picketlink SVN: r1479 - in console/trunk: ide-configs and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 01:12:40 -0500 (Sat, 03 Mar 2012)
New Revision: 1479
Added:
console/trunk/ide-configs/
console/trunk/ide-configs/README.txt
Log:
Initial commit.
Added: console/trunk/ide-configs/README.txt
===================================================================
--- console/trunk/ide-configs/README.txt (rev 0)
+++ console/trunk/ide-configs/README.txt 2012-03-03 06:12:40 UTC (rev 1479)
@@ -0,0 +1 @@
+Please, use the configurations provided by the JBoss AS 7 Project.
\ No newline at end of file
12 years, 9 months
Picketlink SVN: r1478 - in console/trunk/gui/src/main/java/org/picketlink/console/client/core: security and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 01:12:23 -0500 (Sat, 03 Mar 2012)
New Revision: 1478
Added:
console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java
Log:
Initial commit.
Copied: console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java (from rev 1469, console/trunk/gui/src/main/java/org/picketlink/console/client/security/SecurityManager.java)
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java 2012-03-03 06:12:23 UTC (rev 1478)
@@ -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.core.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";
+ }
+}
12 years, 9 months
Picketlink SVN: r1477 - in console/trunk/gui: src and 26 other directories.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 01:11:44 -0500 (Sat, 03 Mar 2012)
New Revision: 1477
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/core/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkGinjector.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkModule.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.properties
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessagesFactory.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/DefaultPlace.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/DefaultPlaceManager.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/NameTokens.java
console/trunk/gui/src/main/java/org/picketlink/console/client/gin/
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/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/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/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/public/
console/trunk/gui/src/main/java/org/picketlink/console/public/images/
console/trunk/gui/src/main/java/org/picketlink/console/public/images/close.gif
console/trunk/gui/src/main/java/org/picketlink/console/public/images/login.gif
console/trunk/gui/src/main/java/org/picketlink/console/public/images/picketlink-banner-1180px.png
console/trunk/gui/src/main/java/org/picketlink/console/public/images/user.png
console/trunk/gui/src/main/java/org/picketlink/console/server/
console/trunk/gui/src/main/java/org/picketlink/console/server/config/
console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java
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/ServerModule.java
console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServletModule.java
console/trunk/gui/src/main/java/org/picketlink/console/shared/
console/trunk/gui/src/main/resources/
console/trunk/gui/src/main/resources/META-INF/
console/trunk/gui/src/main/resources/META-INF/persistence.xml
console/trunk/gui/src/main/resources/log4j.xml
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:
Initial commit.
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-03 06:11:44 UTC (rev 1477)
@@ -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.core.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-03 06:11:44 UTC (rev 1477)
@@ -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.core.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-03 06:11:44 UTC (rev 1477)
@@ -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/core/gin/PicketLinkGinjector.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkGinjector.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkGinjector.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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.core.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/core/gin/PicketLinkModule.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkModule.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkModule.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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.core.gin;
+
+import org.picketlink.console.client.core.place.DefaultPlace;
+import org.picketlink.console.client.core.place.DefaultPlaceManager;
+import org.picketlink.console.client.core.place.NameTokens;
+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(DefaultPlaceManager.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/core/message/MessageConstants.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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.core.message;
+
+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/core/message/MessageConstants.properties
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.properties (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.properties 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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/core/message/MessagesFactory.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessagesFactory.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessagesFactory.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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.core.message;
+
+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/core/place/DefaultPlace.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/DefaultPlace.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/DefaultPlace.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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.core.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/core/place/DefaultPlaceManager.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/DefaultPlaceManager.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/DefaultPlaceManager.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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.core.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 DefaultPlaceManager extends PlaceManagerImpl {
+
+ private final PlaceRequest defaultPlaceRequest;
+
+ @Inject
+ public DefaultPlaceManager(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/core/place/NameTokens.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/NameTokens.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/place/NameTokens.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -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.core.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/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-03 06:11:44 UTC (rev 1477)
@@ -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-03 06:11:44 UTC (rev 1477)
@@ -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/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-03 06:11:44 UTC (rev 1477)
@@ -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-03 06:11:44 UTC (rev 1477)
@@ -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/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/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-03 06:11:44 UTC (rev 1477)
@@ -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.core.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-03 06:11:44 UTC (rev 1477)
@@ -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-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,117 @@
+/*
+* 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.core.place.NameTokens;
+import org.picketlink.console.client.core.security.SecurityManager;
+import org.picketlink.console.client.model.Credentials;
+
+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.NoGatekeeper;
+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();
+
+ void setLoginClickHandlers(ClickHandler clickHandler);
+
+ void resetAndFocus();
+
+ void setError(String errorText);
+ }
+
+ @ProxyStandard
+ @NameToken(NameTokens.login)
+ @NoGatekeeper
+ 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();
+ getView().setLoginClickHandlers(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-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,122 @@
+/*
+* 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.core.message.MessagesFactory;
+import org.picketlink.console.client.model.Credentials;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+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 DefaultWindow window;
+ private DialogueOptions options;
+ private Form<Credentials> form;
+ private TextBoxItem userNameTextbox;
+ private TextBoxItem passwordTextbox;
+
+ @Inject
+ public LoginView() {
+ }
+
+ @Override
+ public Widget asWidget() {
+ this.window = new DefaultWindow("Login");
+
+ this.window.setWidth(289);
+ this.window.setHeight(240);
+ this.window.setModal(true);
+
+ this.window.setGlassEnabled(false);
+
+ this.window.setWidget(new WindowContent().asWidget());
+
+ return this.window;
+ }
+
+ public Credentials getUserCredentials() {
+ return this.form.getUpdatedEntity();
+ }
+
+ @Override
+ public void setLoginClickHandlers(ClickHandler clickHandler) {
+ this.options = new DialogueOptions(MessagesFactory.instance().OK(), clickHandler, "cancel", new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+
+ }
+ });
+ }
+
+ @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());
+ userNameTextbox.asWidget().setWidth("200px");
+
+ passwordTextbox = new TextBoxItem("password", MessagesFactory.instance().Password());
+ passwordTextbox.asWidget().setWidth("200px");
+
+ 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-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,93 @@
+package org.picketlink.console.client.widgets.common;
+
+
+import org.picketlink.console.client.core.security.SecurityManager;
+import org.picketlink.console.client.resources.ImageFactory;
+
+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-03 06:11:44 UTC (rev 1477)
@@ -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/public/images/close.gif
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/public/images/close.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/public/images/login.gif
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/public/images/login.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/public/images/picketlink-banner-1180px.png
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/public/images/picketlink-banner-1180px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/public/images/user.png
===================================================================
(Binary files differ)
Property changes on: console/trunk/gui/src/main/java/org/picketlink/console/public/images/user.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,36 @@
+package org.picketlink.console.server.config;
+
+import javax.servlet.ServletContextEvent;
+
+import org.picketlink.console.server.guice.DispatchServletModule;
+import org.picketlink.console.server.guice.ServerModule;
+import org.picketlink.console.server.guice.ServletModule;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.jpa.JpaPersistModule;
+import com.google.inject.servlet.GuiceServletContextListener;
+
+public class GuiceServletConfig extends GuiceServletContextListener {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.inject.servlet.GuiceServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
+ */
+ @Override
+ public void contextInitialized(ServletContextEvent servletContextEvent) {
+ super.contextInitialized(servletContextEvent);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.inject.servlet.GuiceServletContextListener#getInjector()
+ */
+ @Override
+ protected Injector getInjector() {
+ return Guice.createInjector(new ServerModule(), new DispatchServletModule(), new JpaPersistModule("picketlink-console-pu"), new ServletModule());
+ }
+
+}
\ No newline at end of file
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-03 06:11:44 UTC (rev 1477)
@@ -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/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-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,10 @@
+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/java/org/picketlink/console/server/guice/ServletModule.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServletModule.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServletModule.java 2012-03-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,12 @@
+package org.picketlink.console.server.guice;
+
+import com.google.inject.persist.PersistFilter;
+
+public class ServletModule extends com.google.inject.servlet.ServletModule {
+
+ @Override
+ protected void configureServlets() {
+ filter("/*").through(PersistFilter.class);
+ }
+
+}
Added: console/trunk/gui/src/main/resources/META-INF/persistence.xml
===================================================================
--- console/trunk/gui/src/main/resources/META-INF/persistence.xml (rev 0)
+++ console/trunk/gui/src/main/resources/META-INF/persistence.xml 2012-03-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="picketlink-console-pu"
+ transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+ <properties>
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:picketlink-console-db" />
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.connection.username" value="sa" />
+ <property name="hibernate.connection.password" value="" />
+ </properties>
+ </persistence-unit>
+
+</persistence>
Added: console/trunk/gui/src/main/resources/log4j.xml
===================================================================
--- console/trunk/gui/src/main/resources/log4j.xml (rev 0)
+++ console/trunk/gui/src/main/resources/log4j.xml 2012-03-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <!-- Appenders -->
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p: %c - %m%n" />
+ </layout>
+ </appender>
+ <logger name="org.hibernate">
+ <level value="INFO" />
+ </logger>
+ <!-- Root Logger -->
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="console" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
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-03 06:11:44 UTC (rev 1477)
@@ -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-03 06:11:44 UTC (rev 1477)
@@ -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.config.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-03 06:11:44 UTC (rev 1477)
@@ -0,0 +1,2 @@
+/* Add css rules here for your application. */
+
12 years, 9 months
Picketlink SVN: r1476 - in console/trunk: gui and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 01:10:17 -0500 (Sat, 03 Mar 2012)
New Revision: 1476
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-03 06:10:17 UTC (rev 1476)
@@ -0,0 +1,135 @@
+<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.inject.extensions</groupId>
+ <artifactId>guice-persist</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>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ </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: r1475 - console/trunk.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 01:08:44 -0500 (Sat, 03 Mar 2012)
New Revision: 1475
Removed:
console/trunk/gui/
console/trunk/ide-configs/
Log:
new trunk.
12 years, 9 months
Picketlink SVN: r1474 - console/trunk.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 00:49:06 -0500 (Sat, 03 Mar 2012)
New Revision: 1474
Modified:
console/trunk/pom.xml
Log:
Initial commit.
Modified: console/trunk/pom.xml
===================================================================
--- console/trunk/pom.xml 2012-03-03 05:48:17 UTC (rev 1473)
+++ console/trunk/pom.xml 2012-03-03 05:49:06 UTC (rev 1474)
@@ -104,6 +104,12 @@
<artifactId>guice-servlet</artifactId>
<version>${guice.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-persist</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
<dependency>
<groupId>com.google.gwt.inject</groupId>
12 years, 9 months
Picketlink SVN: r1473 - in console/trunk/gui/src/main: java/org/picketlink/console/client and 14 other directories.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 00:48:17 -0500 (Sat, 03 Mar 2012)
New Revision: 1473
Added:
console/trunk/gui/src/main/java/org/picketlink/console/client/core/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/DefaultPlace.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/DefaultPlaceManager.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/NameTokens.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/NewTokenFormatter.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkGinjector.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkModule.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.properties
console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessagesFactory.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/
console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/CurrentUser.java
console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java
console/trunk/gui/src/main/java/org/picketlink/console/public/
console/trunk/gui/src/main/java/org/picketlink/console/server/config/
console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java
console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServletModule.java
console/trunk/gui/src/main/resources/META-INF/
console/trunk/gui/src/main/resources/META-INF/persistence.xml
console/trunk/gui/src/main/resources/log4j.xml
Removed:
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/server/guice/GuiceServletConfig.java
Modified:
console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml
console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java
console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPagePresenter.java
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/common/MainPanelWidget.java
console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServerModule.java
console/trunk/gui/src/main/webapp/WEB-INF/web.xml
Log:
Initial commit.
Modified: console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/PicketLinkConsole.gwt.xml 2012-03-03 05:48:17 UTC (rev 1473)
@@ -30,6 +30,6 @@
<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' />
+ <set-configuration-property name='gin.ginjector' value='org.picketlink.console.client.core.gin.PicketLinkGinjector' />
</module>
\ No newline at end of file
Modified: console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/PicketLinkConsole.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -21,7 +21,7 @@
*/
package org.picketlink.console.client;
-import org.picketlink.console.client.gin.PicketLinkGinjector;
+import org.picketlink.console.client.core.gin.PicketLinkGinjector;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
@@ -37,7 +37,7 @@
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
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/core/DefaultPlace.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/DefaultPlace.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/DefaultPlace.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -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.core;
+
+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/core/DefaultPlaceManager.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/DefaultPlaceManager.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/DefaultPlaceManager.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -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.core;
+
+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 DefaultPlaceManager extends PlaceManagerImpl {
+
+ private final PlaceRequest defaultPlaceRequest;
+
+ @Inject
+ public DefaultPlaceManager(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);
+ }
+
+ @Override
+ public void revealErrorPlace(String invalidHistoryToken) {
+ // TODO: Configure a error place
+ super.revealErrorPlace(invalidHistoryToken);
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/core/NameTokens.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/NameTokens.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/NameTokens.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,40 @@
+/*
+* 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.core;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class NameTokens {
+
+ public static final String main = "main";
+ public static final String signInPage = "signInPage";
+
+ public static String getMain() {
+ return main;
+ }
+
+ public static String getSignInPage() {
+ return signInPage;
+ }
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/core/NewTokenFormatter.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/NewTokenFormatter.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/NewTokenFormatter.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,296 @@
+package org.picketlink.console.client.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import com.google.gwt.http.client.URL;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.proxy.PlaceRequest;
+import com.gwtplatform.mvp.client.proxy.TokenFormatException;
+import com.gwtplatform.mvp.client.proxy.TokenFormatter;
+
+/**
+ * Formats tokens from {@code String} values to {@link PlaceRequest} and {@link PlaceRequest} hierarchies and vice-versa. The default implementation
+ * uses:
+ * <ul>
+ * <li>{@code '/'} to separate {@link PlaceRequest}s in a hierarchy;</li>
+ * <li>{@code ';'} to separate parameters in a {@link PlaceRequest};</li>
+ * <li>{@code '='} to separate the parameter name from its value;</li>
+ * <li>{@code '\'} to escape separators inside parameters names and values in a {@link PlaceRequest}.</li>
+ * </ul>
+ * These symbols cannot be used in a name token. If one of the separating symbol is encountered in a parameter or a value it is escaped using the
+ * {@code '\'} character by replacing {@code '/'} with {@code '\0'}, {@code ';'} with {@code '\1'}, {@code '='} with {@code '\2'} and {@code '\'} with
+ * {@code '\3'}.
+ * <p />
+ * Before decoding a {@link String} URL fragment into a {@link PlaceRequest} or a {@link PlaceRequest} hierarchy, {@link NewTokenFormatter} will first
+ * pass the {@link String} through {@link URL#decodeQueryString(String)} so that if the URL was URL-encoded by some user agent, like a mail user
+ * agent, it is still parsed correctly.
+ * <p />
+ * For example, {@link NewTokenFormatter} would parse any of the following:
+ *
+ * <pre>
+ * nameToken1%3Bparam1.1%3Dvalue1.1%3Bparam1.2%3Dvalue1.2%2FnameToken2%2FnameToken3%3Bparam3.1%3Dvalue%03%11
+ * nameToken1;param1.1=value1.1;param1.2=value1.2/nameToken2/nameToken3;param3.1=value\03\21
+ * </pre>
+ *
+ * Into the following hierarchy of {@link PlaceRequest}:
+ *
+ * <pre>
+ * {
+ * { "nameToken1", { {"param1.1", "value1.1"}, {"parame1.2","value1.2"} },
+ * "nameToken2", {},
+ * "nameToken3", { {"param3.1", "value/3=1"} } }
+ * }
+ * </pre>
+ *
+ * If you want to use different symbols as separator, use the {@link #ParameterTokenFormatter(String, String, String, String)} constructor.
+ *
+ * @author Philippe Beaudoin
+ * @author Yannis Gonianakis
+ * @author Daniel Colchete
+ */
+public class NewTokenFormatter implements TokenFormatter {
+
+ protected static final String DEFAULT_HIERARCHY_SEPARATOR = "/";
+ protected static final String DEFAULT_PARAM_SEPARATOR = ";";
+ protected static final String DEFAULT_VALUE_SEPARATOR = "=";
+ protected static final String DEFAULT_ESCAPE_CHARACTER = "\\";
+
+ protected static final String ESCAPED_HIERARCHY_SEPARATOR = "\\0"; // escaped version for the DEFAULT_HIERARCHY_SEPARATOR
+ protected static final String ESCAPED_PARAM_SEPARATOR = "\\1"; // escaped version for the DEFAULT_PARAM_SEPARATOR
+ protected static final String ESCAPED_VALUE_SEPARATOR = "\\2"; // escaped version for the DEFAULT_VALUE_SEPARATOR
+ protected static final String ESCAPED_ESCAPE_CHAR = "\\3"; // escaped version for the DEFAULT_ESCAPE_CHARACTER
+
+ private final String escapeCharacter;
+ private final String hierarchySeparator;
+ private final String paramSeparator;
+ private final String valueSeparator;
+
+ /**
+ * Builds a {@link NewTokenFormatter} using the default separators and escape character.
+ */
+ @Inject
+ public NewTokenFormatter() {
+ this(DEFAULT_HIERARCHY_SEPARATOR, DEFAULT_PARAM_SEPARATOR, DEFAULT_VALUE_SEPARATOR, DEFAULT_ESCAPE_CHARACTER);
+ }
+
+ /**
+ * This constructor makes it possible to use custom separators in your token formatter. The separators must be 1-letter strings, they must all be
+ * different from one another, and they must be encoded when ran through {@link URL#encodeQueryString(String)})
+ *
+ * @param hierarchySeparator
+ * The symbol used to separate {@link PlaceRequest} in a hierarchy. Must be a 1-character string and can't be {@code %}.
+ * @param paramSeparator
+ * The symbol used to separate parameters in a {@link PlaceRequest}. Must be a 1-character string and can't be {@code %}.
+ * @param valueSeparator
+ * The symbol used to separate the parameter name from its value. Must be a 1-character string and can't be {@code %}.
+ */
+ public NewTokenFormatter(String hierarchySeparator, String paramSeparator, String valueSeparator) {
+ this(hierarchySeparator, paramSeparator, valueSeparator, DEFAULT_ESCAPE_CHARACTER);
+ }
+
+ /**
+ * This constructor makes it possible to use custom separators and custom escape character in your token formatter. The separators and the escape
+ * character must be 1-letter strings, they must all be different from one another, and they must be encoded when ran through
+ * {@link URL#encodeQueryString(String)})
+ *
+ * @param hierarchySeparator
+ * The symbol used to separate {@link PlaceRequest} in a hierarchy. Must be a 1-character string and can't be {@code %}.
+ * @param paramSeparator
+ * The symbol used to separate parameters in a {@link PlaceRequest}. Must be a 1-character string and can't be {@code %}.
+ * @param valueSeparator
+ * The symbol used to separate the parameter name from its value. Must be a 1-character string and can't be {@code %}.
+ * @param escapeCharacter
+ * The symbol used to escape the separator symbols inside parameter names and values. Must be a 1-character string and can't be
+ * {@code %}.
+ */
+ public NewTokenFormatter(String hierarchySeparator, String paramSeparator, String valueSeparator, String escapeCharacter) {
+ assert hierarchySeparator.length() == 1;
+ assert paramSeparator.length() == 1;
+ assert valueSeparator.length() == 1;
+ assert escapeCharacter.length() == 1;
+ assert !escapeCharacter.equals(hierarchySeparator);
+ assert !escapeCharacter.equals(paramSeparator);
+ assert !escapeCharacter.equals(valueSeparator);
+ assert !hierarchySeparator.equals(paramSeparator);
+ assert !hierarchySeparator.equals(valueSeparator);
+ assert !paramSeparator.equals(valueSeparator);
+ assert !escapeCharacter.equals(URL.encodeQueryString(escapeCharacter));
+ assert !valueSeparator.equals(URL.encodeQueryString(valueSeparator));
+ assert !hierarchySeparator.equals(URL.encodeQueryString(hierarchySeparator));
+ assert !paramSeparator.equals(URL.encodeQueryString(paramSeparator));
+ assert !escapeCharacter.equals("%");
+ assert !hierarchySeparator.equals("%");
+ assert !paramSeparator.equals("%");
+ assert !valueSeparator.equals("%");
+
+ this.hierarchySeparator = hierarchySeparator;
+ this.paramSeparator = paramSeparator;
+ this.valueSeparator = valueSeparator;
+ this.escapeCharacter = escapeCharacter;
+ }
+
+ @Override
+ public String toHistoryToken(List<PlaceRequest> placeRequestHierarchy) throws TokenFormatException {
+ StringBuilder out = new StringBuilder();
+
+ for (int i = 0; i < placeRequestHierarchy.size(); ++i) {
+ if (i != 0) {
+ out.append(hierarchySeparator);
+ }
+ out.append(toPlaceTokenUnescaped(placeRequestHierarchy.get(i)));
+ }
+
+ return out.toString();
+ }
+
+ @Override
+ public PlaceRequest toPlaceRequest(String placeToken) throws TokenFormatException {
+ return unescapedToPlaceRequest(URL.decodeQueryString(placeToken));
+ }
+
+ private PlaceRequest unescapedToPlaceRequest(String unescapedPlaceToken) throws TokenFormatException {
+ PlaceRequest req = null;
+
+ int split = unescapedPlaceToken.indexOf(paramSeparator);
+ if (split == 0) {
+ throw new TokenFormatException("Place history token is missing.");
+ } else if (split == -1) {
+ req = new PlaceRequest(unescapedPlaceToken);
+ } else if (split >= 0) {
+ req = new PlaceRequest(unescapedPlaceToken.substring(0, split));
+ String paramsChunk = unescapedPlaceToken.substring(split + 1);
+ String[] paramTokens = paramsChunk.split(paramSeparator);
+ for (String paramToken : paramTokens) {
+ if (paramToken.isEmpty()) {
+ throw new TokenFormatException("Bad parameter: Successive parameters require a single '" + paramSeparator + "' between them.");
+ }
+ String[] param = splitParamToken(paramToken);
+ String key = paramValueUnescape(param[0]);
+ String value = paramValueUnescape(param[1]);
+ req = req.with(key, value);
+ }
+ }
+ return req;
+ }
+
+ @Override
+ public List<PlaceRequest> toPlaceRequestHierarchy(String historyToken) throws TokenFormatException {
+ historyToken = URL.decodeQueryString(historyToken);
+
+ int split = historyToken.indexOf(hierarchySeparator);
+ if (split == 0) {
+ throw new TokenFormatException("Place history token is missing.");
+ } else {
+ List<PlaceRequest> result = new ArrayList<PlaceRequest>();
+ if (split == -1) {
+ result.add(unescapedToPlaceRequest(historyToken)); // History token consists of a single place token
+ } else {
+ String[] placeTokens = historyToken.split(hierarchySeparator);
+ for (String placeToken : placeTokens) {
+ if (placeToken.isEmpty()) {
+ throw new TokenFormatException("Bad parameter: Successive place tokens require a single '" + hierarchySeparator + "' between them.");
+ }
+ result.add(unescapedToPlaceRequest(placeToken));
+ }
+ }
+ return result;
+ }
+ }
+
+ @Override
+ public String toPlaceToken(PlaceRequest placeRequest) throws TokenFormatException {
+ return toPlaceTokenUnescaped(placeRequest);
+ }
+
+ private String toPlaceTokenUnescaped(PlaceRequest placeRequest) throws TokenFormatException {
+ StringBuilder out = new StringBuilder();
+ out.append(placeRequest.getNameToken());
+
+ Set<String> params = placeRequest.getParameterNames();
+ if (params != null) {
+ for (String name : params) {
+ out.append(paramSeparator).append(paramValueEscape(name)).append(valueSeparator).append(paramValueEscape(placeRequest.getParameter(name, null)));
+ }
+ }
+
+ return out.toString();
+ }
+
+ private String[] splitParamToken(String paramToken) {
+ String[] param = paramToken.split(valueSeparator, 2);
+ if (param.length == 1 // pattern didn't match
+ || param[0].contains(valueSeparator) // un-escaped separator encountered in the key
+ || param[1].contains(valueSeparator)) { // un-escaped separator encountered in the value
+ throw new TokenFormatException("Bad parameter: Parameters require a single '" + valueSeparator + "' between the key and value.");
+ }
+ return param;
+ }
+
+ private String paramValueEscape(String value) {
+
+ StringBuffer sbuf = new StringBuffer();
+ int len = value.length();
+
+ char escapeChar = escapeCharacter.charAt(0);
+ char hierarchyChar = hierarchySeparator.charAt(0);
+ char paramChar = paramSeparator.charAt(0);
+ char valueChar = valueSeparator.charAt(0);
+
+ for (int i = 0; i < len; i++) {
+ char ch = value.charAt(i);
+
+ if (ch == escapeChar) {
+ sbuf.append(ESCAPED_ESCAPE_CHAR);
+ } else if (ch == hierarchyChar) {
+ sbuf.append(ESCAPED_HIERARCHY_SEPARATOR);
+ } else if (ch == paramChar) {
+ sbuf.append(ESCAPED_PARAM_SEPARATOR);
+ } else if (ch == valueChar) {
+ sbuf.append(ESCAPED_VALUE_SEPARATOR);
+ } else {
+ sbuf.append(ch);
+ }
+ }
+
+ return URL.encodeQueryString(sbuf.toString());
+ }
+
+ private String paramValueUnescape(String value) {
+ value = URL.decodeQueryString(value);
+
+ StringBuffer sbuf = new StringBuffer();
+ int len = value.length();
+
+ char escapeChar = escapeCharacter.charAt(0);
+
+ char hierarchyNum = ESCAPED_HIERARCHY_SEPARATOR.charAt(1);
+ char paramNum = ESCAPED_PARAM_SEPARATOR.charAt(1);
+ char valueNum = ESCAPED_VALUE_SEPARATOR.charAt(1);
+ char escapeNum = ESCAPED_ESCAPE_CHAR.charAt(1);
+
+ for (int i = 0; i < len; i++) {
+ char ch = value.charAt(i);
+
+ if (ch == escapeChar) {
+ i++;
+ char ch2 = value.charAt(i);
+ if (ch2 == hierarchyNum) {
+ sbuf.append(hierarchySeparator);
+ } else if (ch2 == paramNum) {
+ sbuf.append(paramSeparator);
+ } else if (ch2 == valueNum) {
+ sbuf.append(valueSeparator);
+ } else if (ch2 == escapeNum) {
+ sbuf.append('\\');
+ }
+ } else {
+ sbuf.append(ch);
+ }
+ }
+
+ return sbuf.toString();
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkGinjector.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkGinjector.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkGinjector.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -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.core.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/core/gin/PicketLinkModule.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkModule.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/gin/PicketLinkModule.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,63 @@
+/*
+* 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.core.gin;
+
+import org.picketlink.console.client.core.DefaultPlace;
+import org.picketlink.console.client.core.DefaultPlaceManager;
+import org.picketlink.console.client.core.NameTokens;
+import org.picketlink.console.client.core.NewTokenFormatter;
+import org.picketlink.console.client.core.security.CurrentUser;
+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.google.gwt.event.shared.EventBus;
+import com.google.gwt.event.shared.SimpleEventBus;
+import com.google.inject.Singleton;
+import com.gwtplatform.mvp.client.RootPresenter;
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+import com.gwtplatform.mvp.client.proxy.TokenFormatter;
+
+/**
+ * @author Pedro Silva
+ * @since 03/01/2011
+ */
+public class PicketLinkModule extends AbstractPresenterModule {
+
+ @Override
+ protected void configure() {
+ bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
+ bind(PlaceManager.class).to(DefaultPlaceManager.class).in(Singleton.class);
+ bind(TokenFormatter.class).to(NewTokenFormatter.class).in(Singleton.class);
+ bind(RootPresenter.class).asEagerSingleton();
+ bind(CurrentUser.class).in(Singleton.class);
+
+ bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.signInPage);
+
+ 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/core/message/MessageConstants.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -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.core.message;
+
+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/core/message/MessageConstants.properties
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.properties (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessageConstants.properties 2012-03-03 05:48:17 UTC (rev 1473)
@@ -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/core/message/MessagesFactory.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessagesFactory.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/message/MessagesFactory.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -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.core.message;
+
+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/core/security/CurrentUser.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/CurrentUser.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/CurrentUser.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,27 @@
+package org.picketlink.console.client.core.security;
+
+import com.google.inject.Singleton;
+
+@Singleton
+public class CurrentUser {
+
+ private boolean loggedIn;
+ private String userName;
+
+ public boolean isLoggedIn() {
+ return loggedIn;
+ }
+
+ public void setLoggedIn(boolean loggedIn) {
+ this.loggedIn = loggedIn;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+}
Added: console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/core/security/SecurityManager.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -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.core.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";
+ }
+}
Deleted: 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 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -1,41 +0,0 @@
-/*
-* 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();
-
-}
Deleted: 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 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessageConstants.properties 2012-03-03 05:48:17 UTC (rev 1473)
@@ -1,7 +0,0 @@
-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
Deleted: 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 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/resources/MessagesFactory.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -1,46 +0,0 @@
-/*
-* 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;
- }
-
-}
Modified: 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 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/MainPagePresenter.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -21,7 +21,7 @@
*/
package org.picketlink.console.client.view;
-import org.picketlink.console.client.place.NameTokens;
+import org.picketlink.console.client.core.NameTokens;
import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
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-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginPresenter.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -21,18 +21,18 @@
*/
package org.picketlink.console.client.view.security;
+import org.picketlink.console.client.core.NameTokens;
+import org.picketlink.console.client.core.security.SecurityManager;
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.NoGatekeeper;
import com.gwtplatform.mvp.client.annotations.ProxyStandard;
import com.gwtplatform.mvp.client.proxy.PlaceManager;
import com.gwtplatform.mvp.client.proxy.PlaceRequest;
@@ -57,7 +57,8 @@
}
@ProxyStandard
- @NameToken(NameTokens.login)
+ @NameToken(NameTokens.signInPage)
+ @NoGatekeeper
public interface MyProxy extends ProxyPlace<LoginPresenter> {
}
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-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/view/security/LoginView.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -26,8 +26,8 @@
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.core.message.MessagesFactory;
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;
@@ -57,8 +57,8 @@
public Widget asWidget() {
this.window = new DefaultWindow("Login");
- this.window.setWidth(480);
- this.window.setHeight(230);
+ this.window.setWidth(290);
+ this.window.setHeight(240);
this.window.setModal(true);
this.window.setGlassEnabled(false);
@@ -106,8 +106,11 @@
form = new Form<Credentials>(Credentials.class);
userNameTextbox = new TextBoxItem("userName", MessagesFactory.instance().UserName());
+ userNameTextbox.asWidget().setWidth("200px");
+
passwordTextbox = new TextBoxItem("password", MessagesFactory.instance().Password());
-
+ passwordTextbox.asWidget().setWidth("200px");
+
form.setFields(userNameTextbox, passwordTextbox);
layout.add(form);
Modified: 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 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/client/widgets/common/MainPanelWidget.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -1,9 +1,9 @@
package org.picketlink.console.client.widgets.common;
+import org.picketlink.console.client.core.security.SecurityManager;
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;
Added: console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/config/GuiceServletConfig.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,36 @@
+package org.picketlink.console.server.config;
+
+import javax.servlet.ServletContextEvent;
+
+import org.picketlink.console.server.guice.DispatchServletModule;
+import org.picketlink.console.server.guice.ServerModule;
+import org.picketlink.console.server.guice.ServletModule;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.jpa.JpaPersistModule;
+import com.google.inject.servlet.GuiceServletContextListener;
+
+public class GuiceServletConfig extends GuiceServletContextListener {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.inject.servlet.GuiceServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
+ */
+ @Override
+ public void contextInitialized(ServletContextEvent servletContextEvent) {
+ super.contextInitialized(servletContextEvent);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.inject.servlet.GuiceServletContextListener#getInjector()
+ */
+ @Override
+ protected Injector getInjector() {
+ return Guice.createInjector(new ServerModule(), new DispatchServletModule(), new JpaPersistModule("picketlink-console-pu"), new ServletModule());
+ }
+
+}
\ No newline at end of file
Deleted: 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 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/guice/GuiceServletConfig.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -1,13 +0,0 @@
-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());
- }
-}
Modified: 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 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServerModule.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -6,6 +6,5 @@
@Override
protected void configureHandlers() {
-
}
}
Added: console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServletModule.java
===================================================================
--- console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServletModule.java (rev 0)
+++ console/trunk/gui/src/main/java/org/picketlink/console/server/guice/ServletModule.java 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,12 @@
+package org.picketlink.console.server.guice;
+
+import com.google.inject.persist.PersistFilter;
+
+public class ServletModule extends com.google.inject.servlet.ServletModule {
+
+ @Override
+ protected void configureServlets() {
+ filter("/*").through(PersistFilter.class);
+ }
+
+}
Added: console/trunk/gui/src/main/resources/META-INF/persistence.xml
===================================================================
--- console/trunk/gui/src/main/resources/META-INF/persistence.xml (rev 0)
+++ console/trunk/gui/src/main/resources/META-INF/persistence.xml 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="picketlink-console-pu"
+ transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+ <properties>
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:picketlink-console-db" />
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.connection.username" value="sa" />
+ <property name="hibernate.connection.password" value="" />
+ </properties>
+ </persistence-unit>
+
+</persistence>
Added: console/trunk/gui/src/main/resources/log4j.xml
===================================================================
--- console/trunk/gui/src/main/resources/log4j.xml (rev 0)
+++ console/trunk/gui/src/main/resources/log4j.xml 2012-03-03 05:48:17 UTC (rev 1473)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <!-- Appenders -->
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p: %c - %m%n" />
+ </layout>
+ </appender>
+ <logger name="org.hibernate">
+ <level value="INFO" />
+ </logger>
+ <!-- Root Logger -->
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="console" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Modified: console/trunk/gui/src/main/webapp/WEB-INF/web.xml
===================================================================
--- console/trunk/gui/src/main/webapp/WEB-INF/web.xml 2012-03-03 05:47:33 UTC (rev 1472)
+++ console/trunk/gui/src/main/webapp/WEB-INF/web.xml 2012-03-03 05:48:17 UTC (rev 1473)
@@ -5,7 +5,7 @@
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<listener>
- <listener-class>org.picketlink.console.server.guice.GuiceServletConfig</listener-class>
+ <listener-class>org.picketlink.console.server.config.GuiceServletConfig</listener-class>
</listener>
<filter>
<filter-name>guiceFilter</filter-name>
12 years, 9 months
Picketlink SVN: r1472 - console/trunk/gui.
by picketlink-commits@lists.jboss.org
Author: pcraveiro
Date: 2012-03-03 00:47:33 -0500 (Sat, 03 Mar 2012)
New Revision: 1472
Modified:
console/trunk/gui/pom.xml
Log:
Initial commit.
Modified: console/trunk/gui/pom.xml
===================================================================
--- console/trunk/gui/pom.xml 2012-03-02 16:42:09 UTC (rev 1471)
+++ console/trunk/gui/pom.xml 2012-03-03 05:47:33 UTC (rev 1472)
@@ -61,6 +61,11 @@
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-persist</artifactId>
+ </dependency>
<dependency>
<groupId>com.google.gwt.inject</groupId>
@@ -72,6 +77,21 @@
<groupId>org.jboss.ballroom</groupId>
<artifactId>widgets</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ </dependency>
</dependencies>
<build>
12 years, 9 months
Picketlink SVN: r1471 - in social/trunk/webapps: openid-consumer/resources/WEB-INF and 4 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-03-02 11:42:09 -0500 (Fri, 02 Mar 2012)
New Revision: 1471
Added:
social/trunk/webapps/openid-consumer/resources/WEB-INF/classes/
social/trunk/webapps/openid-provider/resources/WEB-INF/classes/
Modified:
social/trunk/webapps/openid-consumer/pom.xml
social/trunk/webapps/openid-provider/pom.xml
social/trunk/webapps/picketlink-reg/pom.xml
social/trunk/webapps/picketlink-reg/resources/WEB-INF/context.xml
Log:
remove .svn from packaging
Modified: social/trunk/webapps/openid-consumer/pom.xml
===================================================================
--- social/trunk/webapps/openid-consumer/pom.xml 2012-03-02 15:22:28 UTC (rev 1470)
+++ social/trunk/webapps/openid-consumer/pom.xml 2012-03-02 16:42:09 UTC (rev 1471)
@@ -27,11 +27,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.0.2</version>
<configuration>
<warName>openid-consumer</warName>
<webappDirectory>${basedir}/resources/</webappDirectory>
<warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
+ <packagingExcludes>**/.svn/</packagingExcludes>
</configuration>
</plugin>
</plugins>
Modified: social/trunk/webapps/openid-provider/pom.xml
===================================================================
--- social/trunk/webapps/openid-provider/pom.xml 2012-03-02 15:22:28 UTC (rev 1470)
+++ social/trunk/webapps/openid-provider/pom.xml 2012-03-02 16:42:09 UTC (rev 1471)
@@ -27,11 +27,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.0.2</version>
<configuration>
<warName>openid-provider</warName>
<webappDirectory>${basedir}/resources/</webappDirectory>
<warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
+ <packagingExcludes>**/.svn/</packagingExcludes>
</configuration>
</plugin>
</plugins>
Modified: social/trunk/webapps/picketlink-reg/pom.xml
===================================================================
--- social/trunk/webapps/picketlink-reg/pom.xml 2012-03-02 15:22:28 UTC (rev 1470)
+++ social/trunk/webapps/picketlink-reg/pom.xml 2012-03-02 16:42:09 UTC (rev 1471)
@@ -27,11 +27,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.0.2</version>
<configuration>
<warName>picketlink-reg</warName>
<webappDirectory>${basedir}/resources/</webappDirectory>
<warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
+ <packagingExcludes>**/.svn/</packagingExcludes>
</configuration>
</plugin>
</plugins>
Modified: social/trunk/webapps/picketlink-reg/resources/WEB-INF/context.xml
===================================================================
--- social/trunk/webapps/picketlink-reg/resources/WEB-INF/context.xml 2012-03-02 15:22:28 UTC (rev 1470)
+++ social/trunk/webapps/picketlink-reg/resources/WEB-INF/context.xml 2012-03-02 16:42:09 UTC (rev 1471)
@@ -2,8 +2,8 @@
<Valve className="org.picketlink.social.auth.ExternalAuthenticator"
returnURL="http://localhost:8080/picketlink-reg/auth"
scope="email"
- clientID="193791340666726"
- clientSecret="b6d74e738c5ab1989d9f45c270c5bac6"
+ clientID="some_client_auth"
+ clientSecret="some_client_secret"
roleString="user"/>
<Valve className="org.picketlink.social.reg.RegistrationValve"/>
</Context>
12 years, 9 months