1. Juan Carlos Picado Herrera
  2. encuestame

Commits

Juan Carlos Picado Herrera  committed 124b0bb Merge

Merge branch 'juanpicado' into development

  • Participants
  • Parent commits 0a992ac, 65b8dbe
  • Branches master

Comments (0)

Files changed (6)

File encuestame-business/src/main/java/org/encuestame/business/security/EnMeAuthenticationProvider.java

View file
+/*
+ ************************************************************************************
+ * Copyright (C) 2001-2011 encuestame: system online surveys Copyright (C) 2009
+ * encuestame Development Team.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
+ * specific language governing permissions and limitations under the License.
+ ************************************************************************************
+ */
+package org.encuestame.business.security;
+
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+
+/**
+ * Custom Authentication Provider.
+ * @author Picado, Juan juanATencuestame.org
+ * @since Jan 23, 2011 2:29:04 PM
+ * @version $Id:$
+ */
+public class EnMeAuthenticationProvider implements AuthenticationProvider {
+
+    /* (non-Javadoc)
+     * @see org.springframework.security.authentication.AuthenticationProvider#authenticate(org.springframework.security.core.Authentication)
+     */
+    public Authentication authenticate(Authentication authentication)
+            throws AuthenticationException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.springframework.security.authentication.AuthenticationProvider#supports(java.lang.Class)
+     */
+    public boolean supports(Class<? extends Object> authentication) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+}

File encuestame-persistence/src/main/java/org/encuestame/persistence/dao/imp/NotificationDao.java

View file
      * @return
      */
     @SuppressWarnings("unchecked")
-    private Long retrieveCountNotification(final Account secUser, final String query){
+    private Long retrieveCountNotification(final Account account, final String query){
         Long resultsSize = 0L;
-        final List<Object> list =  getHibernateTemplate().findByNamedParam(query, "user", secUser);
+        final List<Object> list =  getHibernateTemplate().findByNamedParam("select count(*) from Notification "
+                +" WHERE account =:user AND readed = false", "user", account);
         if (list.get(0) instanceof Long){
             resultsSize = (Long) list.get(0);
         }
      * @param secUser
      * @return
      */
-    @SuppressWarnings("unchecked")
     public Long retrieveTotalNotReadedNotificationStatus(final Account user){
         return retrieveCountNotification(user ,"select count(*) from Notification "
-                +" WHERE account = :user AND readed = false");
+                +" WHERE account =:account AND readed = false");
     }
 
     /**

File encuestame-war/src/main/webapp/WEB-INF/flows/signup/error.jsp

View file
+<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
+<%@ include file="/WEB-INF/jsp/includes/initPage.jsp" %>
+<%@ include file="/WEB-INF/jsp/includes/publicBody.jsp" %>
+    <div id="mainUserWrapper">
+        <!--
+            //FUTURE: get Friends
+            http://code.google.com/apis/contacts/docs/3.0/developers_guide_java.html#Retrieving
+         -->
+         <form:form>
+            <h2>
+                Error
+            </h2>
+        </form:form>
+    </div>
+<%@ include file="/WEB-INF/jsp/includes/footer.jsp" %>

File encuestame-war/src/main/webapp/WEB-INF/flows/signup/noAccess.jsp

View file
+<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
+<%@ include file="/WEB-INF/jsp/includes/initPage.jsp" %>
+<%@ include file="/WEB-INF/jsp/includes/publicBody.jsp" %>
+    <div id="mainUserWrapper">
+        <!--
+            //FUTURE: get Friends
+            http://code.google.com/apis/contacts/docs/3.0/developers_guide_java.html#Retrieving
+         -->
+         <form:form>
+            <h2>
+                No Access
+            </h2>
+        </form:form>
+    </div>
+<%@ include file="/WEB-INF/jsp/includes/footer.jsp" %>

File pom.xml

View file
          -->
          <dojo.version>1.5.0</dojo.version>
          <webresources.javascript.location>encuestame-war/src/main/webapp/js</webresources.javascript.location>
+
+        <!-- Plugin Version -->
+	<surefire.version>2.6</surefire.version>
+	<site.version>2.1.1</site.version>
+
      </properties>
 
     <modules>
                     <configuration>
                         <testFailureIgnore>${surefire.failures.ignore}</testFailureIgnore>
                     </configuration>
-                    <version>2.4.3</version>
+                    <version>${surefire.version}</version>
                 </plugin>
 
                 <plugin>
                  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-site-plugin</artifactId>
-                    <version>2.2</version>
+                    <version>${site.version}</version>
                      <configuration>
                       <locales>en,es</locales>
                     </configuration>
                 <version>2.5</version>
             </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-report-plugin</artifactId>
-                <version>2.5</version>
-                <configuration>
-                    <showSuccess>false</showSuccess>
-                </configuration>
-            </plugin>
+            <plugin> 
+               <groupId>org.apache.maven.plugins</groupId> 
+               <artifactId>maven-surefire-plugin</artifactId> 
+               <version>${surefire.version}</version> 
+            </plugin> 
+
+           <plugin> 
+               <groupId>org.apache.maven.plugins</groupId> 
+               <artifactId>maven-surefire-report-plugin</artifactId> 
+               <version>${surefire.version}</version> 
+           </plugin> 
+
+           <plugin> 
+             <groupId>org.apache.maven.plugins</groupId> 
+             <artifactId>maven-failsafe-plugin</artifactId> 
+             <version>${surefire.version}</version> 
+           </plugin> 
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>

File src/site/site.xml

View file
 
     <skin>
         <groupId>org.apache.maven.skins</groupId>
-        <artifactId>maven-default-skin</artifactId>
-        <version>1.0</version>
+        <artifactId>maven-stylus-skin</artifactId> 
+        <version>1.2</version> 
     </skin>