Commits

Juan Carlos Picado Herrera committed 10d240f

ENCUESTAME-48 Add twitter account, In progress, renamed interfaces

Comments (0)

Files changed (29)

encuestame-business/src/main/java/org/encuestame/business/mail/MailServiceImpl.java

 import org.apache.commons.logging.LogFactory;
 import org.apache.velocity.app.VelocityEngine;
 import org.encuestame.core.mail.MailService;
-import org.encuestame.core.service.IService;
+import org.encuestame.core.service.ServiceOperations;
 import org.encuestame.business.service.AbstractBaseService;
 import org.encuestame.utils.mail.InvitationBean;
 import org.encuestame.utils.mail.NotificationBean;
  */
 
 @SuppressWarnings("unchecked")
-public class MailServiceImpl extends AbstractBaseService implements MailService, IService {
+public class MailServiceImpl extends AbstractBaseService implements MailService, ServiceOperations {
 
     private Log log = LogFactory.getLog(this.getClass());
 

encuestame-business/src/main/java/org/encuestame/business/service/ApplicationServices.java

 import org.encuestame.business.service.imp.IPictureService;
 import org.encuestame.business.service.imp.IPollService;
 import org.encuestame.business.service.imp.IProjectService;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.business.service.imp.ISurveyService;
 import org.encuestame.business.service.imp.ITweetPollService;
 import org.springframework.stereotype.Service;
 public class ApplicationServices extends AbstractBaseService implements IApplicationServices {
 
     /** {@link SecurityService}. **/
-    private ISecurityService securityService;
+    private SecurityOperations securityService;
     /** {@link SurveyService}. **/
     private ISurveyService surveyService;
     /** {@link PollService}. **/
     /**
      * @return the securityService
      */
-    public ISecurityService getSecurityService() {
+    public SecurityOperations getSecurityService() {
         return securityService;
     }
 
     /**
      * @param securityService the securityService to set
      */
-    public void setSecurityService(ISecurityService securityService) {
+    public void setSecurityService(SecurityOperations securityService) {
         this.securityService = securityService;
     }
 

encuestame-business/src/main/java/org/encuestame/business/service/SecurityService.java

 import java.util.Set;
 
 import org.apache.log4j.Logger;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.core.security.util.EnMePasswordUtils;
 import org.encuestame.core.security.util.PasswordGenerator;
 import org.encuestame.core.util.ConvertDomainBean;
  * @since 27/04/2009 11:35:01
  */
 @Service
-public class SecurityService extends AbstractBaseService implements ISecurityService {
+public class SecurityService extends AbstractBaseService implements SecurityOperations {
 
     private Logger log = Logger.getLogger(this.getClass());
 

encuestame-business/src/main/java/org/encuestame/business/service/imp/IApplicationServices.java

  */
 package org.encuestame.business.service.imp;
 
-import org.encuestame.core.service.IService;
+import org.encuestame.core.service.ServiceOperations;
 
 /**
  * Interface to Application Bean Service.
  * @since 11/05/2009 14:35:21
  * @version $Id$
  */
-public interface IApplicationServices  extends IService {
+public interface IApplicationServices  extends ServiceOperations {
 
 
     /**
      * Getter.
-     * @return {@link ISecurityService}
+     * @return {@link SecurityOperations}
      */
-    public ISecurityService getSecurityService();
+    public SecurityOperations getSecurityService();
 
     /**
      * Setter.
-     * @param securityService {@link ISecurityService}
+     * @param securityService {@link SecurityOperations}
      */
-    public void setSecurityService(ISecurityService securityService);
+    public void setSecurityService(SecurityOperations securityService);
 
     /**
      * @return the surveyService

encuestame-business/src/main/java/org/encuestame/business/service/imp/IFrontEndService.java

 
 import java.util.List;
 
-import org.encuestame.core.service.IService;
+import org.encuestame.core.service.ServiceOperations;
 import org.encuestame.persistence.exception.EnMeSearchException;
 import org.encuestame.utils.web.frontEnd.UnitSearchItem;
 
  * @since Oct 17, 2010 11:29:51 AM
  * @version $Id:$
  */
-public interface IFrontEndService extends IService {
+public interface IFrontEndService extends ServiceOperations {
 
 
     /**

encuestame-business/src/main/java/org/encuestame/business/service/imp/ILinkedInService.java

 
 package org.encuestame.business.service.imp;
 
-import org.encuestame.core.service.IService;
+import org.encuestame.core.service.ServiceOperations;
 
 
-public interface ILinkedInService extends IService {
+public interface ILinkedInService extends ServiceOperations {
 
     public String getAuthorizeLinkedInUrl();
 }

encuestame-business/src/main/java/org/encuestame/business/service/imp/IMasterSurveyService.java

 
 import java.util.List;
 
-import org.encuestame.core.service.IService;
+import org.encuestame.core.service.ServiceOperations;
 import org.encuestame.persistence.exception.EnMeNoResultsFoundException;
 import org.encuestame.utils.web.UnitHashTag;
 import org.encuestame.utils.web.UnitQuestionBean;
  * @since 27/05/2010 20:36:29
  * @version $Id:$
  */
-public interface IMasterSurveyService extends IService{
+public interface IMasterSurveyService extends ServiceOperations{
 
     /**
      * Suggestion Question List.

encuestame-business/src/main/java/org/encuestame/business/service/imp/ISecurityService.java

-/*
- ************************************************************************************
- * Copyright (C) 2001-2009 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.service.imp;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.encuestame.business.service.SecurityService.FollowOperations;
-import org.encuestame.business.service.SecurityService.Profile;
-import org.encuestame.core.service.IService;
-import org.encuestame.persistence.domain.EnMePermission;
-import org.encuestame.persistence.domain.security.Group;
-import org.encuestame.persistence.domain.security.Permission;
-import org.encuestame.persistence.domain.security.Account;
-import org.encuestame.persistence.domain.security.UserAccount;
-import org.encuestame.persistence.domain.social.SocialProvider;
-import org.encuestame.persistence.exception.EnMeNoResultsFoundException;
-import org.encuestame.persistence.exception.EnMeExpcetion;
-import org.encuestame.persistence.exception.EnmeFailOperation;
-import org.encuestame.utils.security.SignUpBean;
-import org.encuestame.utils.security.SocialAccountBean;
-import org.encuestame.utils.web.UnitGroupBean;
-import org.encuestame.utils.web.UnitLists;
-import org.encuestame.utils.web.UnitPermission;
-import org.encuestame.utils.web.UserAccountBean;
-import org.springframework.mail.MailSendException;
-
-/**
- * Interface for Security Service.
- * @author Picado, Juan juan@encuestame.org
- * @since 27/04/2009  11:35:01
- * @version $Id$
- */
-public interface ISecurityService extends IService {
-
-     String getDefaultUserPermission();
-    /**f
-     * Load list of users.
-     * @return list of users with groups and permission
-     * @throws Exception Exception
-     * @throws EnMeExpcetion excepcion
-     */
-    List<UserAccountBean> loadListUsers(final String currentUsername, final Integer maxResults,
-            final Integer start) throws Exception;
-
-    /**
-     * Retrieve Total Own Users.
-     * @param username
-     * @return
-     * @throws EnMeNoResultsFoundException
-     */
-    Long totalOwnUsers(final String username) throws EnMeNoResultsFoundException;
-
-    /**
-     * Get User Complete Info.
-     * @param currentUsername
-     * @return
-     * @throws EnMeNoResultsFoundException
-     */
-    UserAccountBean getUserCompleteInfo(final Long userId, final String currentUsername) throws EnMeNoResultsFoundException;
-
-
-    /**
-     * Assing Group to User.
-     * @param user user
-     * @param group group
-     * @throws EnMeNoResultsFoundException
-     */
-    void assingGroupFromUser(
-            final Long groupId,
-            final Long userId,
-            final String username) throws EnMeNoResultsFoundException;
-
-    /**
-     * Search user by username.
-     * @param username username
-     * @return {@link UserAccountBean}
-     */
-    UserAccountBean searchUserByUsername(final String username);
-
-    /**
-     * Load all list of permisssions and covert to permission bean.
-     * @return list of permisssions
-     */
-    Collection<UnitPermission> loadAllListPermission();
-
-    /**
-     * Delete Group Domain.
-     * @param Long group
-     */
-    void deleteGroup(final Long groupId);
-
-    /**
-     * Delete user.
-     * @param userBean user to delete
-     * @throws EnMeNoResultsFoundException
-     * @throws EnMeExpcetion exception
-     */
-     void deleteUser(final UserAccountBean userBean) throws EnMeNoResultsFoundException;
-    /**
-     * Renew password.
-     * @param userBean {@link UserAccountBean}
-     * @param newPassword new password
-     * @return new password
-     * @throws EnMeExpcetion exception
-     */
-    String renewPassword(final UserAccountBean userBean, final String newPassword) throws EnMeExpcetion;
-    /**
-     * Update a Group.
-     * @param groupBean {@link UnitGroupBean}
-     */
-    UnitGroupBean updateGroup(UnitGroupBean groupBean) throws EnMeExpcetion;
-    /**
-     * Update user.
-     * @param userBean user bean.
-     * @throws EnMeExpcetion exception
-     */
-    void updateUser(final UserAccountBean userBean);
-    /**
-     * Create a new Group.
-     * @param groupBean group bean
-     * @throws EnMeNoResultsFoundException
-     */
-    UnitGroupBean createGroup(final UnitGroupBean groupBean , final String username) throws EnMeNoResultsFoundException;
-    /**
-     * Create a new Permisssion.
-     * @param permissionBean {@link UnitPermission}
-     */
-    void createPermission(final UnitPermission permissionBean);
-    /**
-     * Create a user, generate password for user and send email to confirmate
-     * the account.
-     * @param userBean user bean
-     * @throws EnMeExpcetion
-     * @throws EnMeExpcetion personalize exception
-     */
-    void createUser(final UserAccountBean userBean,  final String username) throws EnMeExpcetion;
-
-    /**
-     * Assign permission to user.
-     * @param userBean {@link UserAccountBean}
-     * @param permissionBean {@link UnitPermission}
-     * @throws EnMeExpcetion exception
-     */
-    void assignPermission(
-            final UserAccountBean userBean,
-            final UnitPermission permissionBean)
-            throws EnMeExpcetion;
-
-    /**
-     * Remove {@link Group} from User.
-     * @param userBean {@link UserAccountBean}
-     * @param groupBean {@link UnitGroupBean}
-     * @throws EnMeExpcetion
-     */
-    void removeGroupFromUser(
-            final UserAccountBean userBean,
-            final UnitGroupBean groupBean)
-            throws EnMeExpcetion;
-
-    /**
-     * Load Permission domain and covert to permission bean.
-     * @param permission permission
-     * @return permission bean
-     * @throws EnMeExpcetion excepcion
-     */
-    UnitPermission loadBeanPermission(final EnMePermission  permission)
-    throws EnMeExpcetion;
-
-    /**
-     * Load domain permission.
-     * @param permission permission
-     * @return permission domain
-     */
-    Permission loadPermission(final String permission);
-
-    /**
-     * Invite some users to register in the system.
-     * @param email list of users
-     * @param code code
-     * @throws Exception
-     * @throws Exception excepcion
-     */
-    void inviteUser(String email, String code) throws Exception;
-
-    /**
-     * Generate hash code invitation.
-     * @return generated code
-     */
-    String generateHashCodeInvitation();
-
-
-    /**
-     * Find {@link UserAccount} by UserName
-     * @param username user name
-     * @return {@link UserAccount}
-     */
-    UserAccount findUserByUserName(final String username);
-
-    /**
-     * Find {@link UserAccount} by email.
-     * @param email
-     * @return
-     */
-    UserAccount findUserAccountByEmail(final String email);
-
-    /**
-     * Setter.
-     * @param suspendedNotification suspended notification
-     */
-    void setSuspendedNotification(final Boolean suspendedNotification);
-
-
-    /**
-     * Load Groups by Client.
-     * @return
-     * @throws EnMeNoResultsFoundException
-     */
-    List<UnitGroupBean> loadGroups(final String currentUsername) throws EnMeNoResultsFoundException;
-
-    /**
-     * SingUp User
-     * @param singUpBean {@link SignUpBean}.
-     * @return {@link UserAccountBean}.
-     */
-    UserAccountBean singupUser(final SignUpBean singUpBean);
-
-    /**
-     * Search {@link UserAccount} by email.
-     * @param email email
-     * @return
-     */
-    List<UserAccount> searchUsersByEmail(final String email);
-
-    /**
-     * Search List of User By Username
-     * @param username username
-     * @return
-     */
-    List<UserAccount> searchUsersByUsername(final String username);
-
-    /**
-     * Load list of {@link Permission}.
-     * @return list of permissions.
-     */
-    List<UnitPermission> loadPermissions();
-
-    /**
-     * Send password to user.
-     * @param email email
-     * @param password password
-     * @throws MailSendException
-     */
-    void sendUserPassword(final String email,
-            final String password)
-            throws MailSendException;
-
-    /**
-     * Find {@link UserAccount} by UserName
-     * @param username user name
-     * @return {@link UserAccount}
-     */
-    UserAccountBean findUserByEmail(final String email);
-
-    /**
-     * Get Email List by Username.
-     * @param username
-     * @return
-     * @throws EnMeNoResultsFoundException
-     */
-    List<UnitLists> getListbyUsername(final String username) throws EnMeNoResultsFoundException;
-
-    /**
-     * Assign Permission,
-     * @param userId user id
-     * @param permission {@link EnMePermission}.
-     * @param loggedUse user logged.
-     * @throws EnMeExpcetion exception.
-     */
-    void updatePermission(
-            final Long userId,
-            final String loggedUser,
-            final EnMePermission permission,
-            final String action)
-            throws EnMeExpcetion;
-
-    /**
-     * Get Group by Id and User Id.
-     * @param groupId
-     * @param username
-     * @return
-     * @throws EnMeNoResultsFoundException
-     */
-    Group getGroupbyIdandUser(final Long groupId, final String username) throws EnMeNoResultsFoundException;
-
-    /**
-     * User Bean.
-     * @param user
-     * @return
-     */
-    void getStatsByUsers(final UserAccountBean user);
-
-    /**
-     * Get User by Group.
-     * @param secGroupId
-     * @param username
-     * @return
-     */
-    Long getUserbyGroup(final Long groupId, final String username)throws EnMeNoResultsFoundException;
-
-    /**
-     * Count Users by Groups
-     * @param username
-     * @param groupId
-     * @return
-     */
-    List<Object[]> countUsersbyGroups(final Long groupId, final String username);
-
-    /**
-     * Change User Status.
-     * @param username
-     * @throws EnmeFailOperation
-     */
-    void changeUserStatus(final String username) throws EnmeFailOperation;
-
-    /**
-     * Update property for user account.
-     * @param property
-     * @param value
-     * @param username
-     * @throws EnMeNoResultsFoundException
-     */
-    void upadteAccountProfile(
-            final Profile property,
-            final String value,
-            final String username) throws EnMeNoResultsFoundException;
-
-    /**
-     * Update Account Profile.
-     * @param bio
-     * @param email
-     * @param username
-     * @param language
-     * @param completeName
-     * @throws EnMeNoResultsFoundException
-     */
-    void upadteAccountProfile(
-            final String bio,
-            final String language,
-            final String completeName,
-            final String loggedUsername) throws EnMeNoResultsFoundException;
-
-    /**
-     * User Account Is Activated.
-     * @param signUpBean
-     * @return
-     */
-    Boolean isActivated(final SignUpBean signUpBean);
-
-    /**
-     * Add Followers.
-     * @param myUser
-     * @param followerUser
-     * @return
-     * @throws EnMeNoResultsFoundException
-     */
-    UserAccount addFollower(final String myUser, final String followerUser) throws EnMeNoResultsFoundException;
-
-   /**
-    * Follow Operations.
-    * @param userAcc
-    * @param myUsername
-    * @param followerUser
-    * @param operation
-    * @throws EnMeNoResultsFoundException
-    */
-    void followOperations(final UserAccount userAcc,
-            final String myUsername, final String followerUser,
-            final FollowOperations operation) throws EnMeNoResultsFoundException;
-}

encuestame-business/src/main/java/org/encuestame/business/service/imp/ITwitterService.java

 import java.io.IOException;
 
 import org.apache.commons.httpclient.HttpException;
-import org.encuestame.core.service.IService;
+import org.encuestame.core.service.ServiceOperations;
 import org.encuestame.persistence.domain.security.SocialAccount;
 
 import twitter4j.Status;
  * @since Feb 13, 2010 4:07:14 PM
  * @version $Id$
  */
-public interface ITwitterService extends IService{
+public interface ITwitterService extends ServiceOperations{
 
 
     /**

encuestame-business/src/main/java/org/encuestame/business/service/imp/SecurityOperations.java

+/*
+ ************************************************************************************
+ * Copyright (C) 2001-2009 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.service.imp;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.encuestame.business.service.SecurityService.FollowOperations;
+import org.encuestame.business.service.SecurityService.Profile;
+import org.encuestame.core.service.ServiceOperations;
+import org.encuestame.persistence.domain.EnMePermission;
+import org.encuestame.persistence.domain.security.Group;
+import org.encuestame.persistence.domain.security.Permission;
+import org.encuestame.persistence.domain.security.UserAccount;
+import org.encuestame.persistence.exception.EnMeExpcetion;
+import org.encuestame.persistence.exception.EnMeNoResultsFoundException;
+import org.encuestame.persistence.exception.EnmeFailOperation;
+import org.encuestame.utils.security.SignUpBean;
+import org.encuestame.utils.web.UnitGroupBean;
+import org.encuestame.utils.web.UnitLists;
+import org.encuestame.utils.web.UnitPermission;
+import org.encuestame.utils.web.UserAccountBean;
+import org.springframework.mail.MailSendException;
+
+/**
+ * Interface for Security Service.
+ * @author Picado, Juan juan@encuestame.org
+ * @since 27/04/2009  11:35:01
+ * @version $Id$
+ */
+public interface SecurityOperations extends ServiceOperations {
+
+     String getDefaultUserPermission();
+    /**f
+     * Load list of users.
+     * @return list of users with groups and permission
+     * @throws Exception Exception
+     * @throws EnMeExpcetion excepcion
+     */
+    List<UserAccountBean> loadListUsers(final String currentUsername, final Integer maxResults,
+            final Integer start) throws Exception;
+
+    /**
+     * Retrieve Total Own Users.
+     * @param username
+     * @return
+     * @throws EnMeNoResultsFoundException
+     */
+    Long totalOwnUsers(final String username) throws EnMeNoResultsFoundException;
+
+    /**
+     * Get User Complete Info.
+     * @param currentUsername
+     * @return
+     * @throws EnMeNoResultsFoundException
+     */
+    UserAccountBean getUserCompleteInfo(final Long userId, final String currentUsername) throws EnMeNoResultsFoundException;
+
+
+    /**
+     * Assing Group to User.
+     * @param user user
+     * @param group group
+     * @throws EnMeNoResultsFoundException
+     */
+    void assingGroupFromUser(
+            final Long groupId,
+            final Long userId,
+            final String username) throws EnMeNoResultsFoundException;
+
+    /**
+     * Search user by username.
+     * @param username username
+     * @return {@link UserAccountBean}
+     */
+    UserAccountBean searchUserByUsername(final String username);
+
+    /**
+     * Load all list of permisssions and covert to permission bean.
+     * @return list of permisssions
+     */
+    Collection<UnitPermission> loadAllListPermission();
+
+    /**
+     * Delete Group Domain.
+     * @param Long group
+     */
+    void deleteGroup(final Long groupId);
+
+    /**
+     * Delete user.
+     * @param userBean user to delete
+     * @throws EnMeNoResultsFoundException
+     * @throws EnMeExpcetion exception
+     */
+     void deleteUser(final UserAccountBean userBean) throws EnMeNoResultsFoundException;
+    /**
+     * Renew password.
+     * @param userBean {@link UserAccountBean}
+     * @param newPassword new password
+     * @return new password
+     * @throws EnMeExpcetion exception
+     */
+    String renewPassword(final UserAccountBean userBean, final String newPassword) throws EnMeExpcetion;
+    /**
+     * Update a Group.
+     * @param groupBean {@link UnitGroupBean}
+     */
+    UnitGroupBean updateGroup(UnitGroupBean groupBean) throws EnMeExpcetion;
+    /**
+     * Update user.
+     * @param userBean user bean.
+     * @throws EnMeExpcetion exception
+     */
+    void updateUser(final UserAccountBean userBean);
+    /**
+     * Create a new Group.
+     * @param groupBean group bean
+     * @throws EnMeNoResultsFoundException
+     */
+    UnitGroupBean createGroup(final UnitGroupBean groupBean , final String username) throws EnMeNoResultsFoundException;
+    /**
+     * Create a new Permisssion.
+     * @param permissionBean {@link UnitPermission}
+     */
+    void createPermission(final UnitPermission permissionBean);
+    /**
+     * Create a user, generate password for user and send email to confirmate
+     * the account.
+     * @param userBean user bean
+     * @throws EnMeExpcetion
+     * @throws EnMeExpcetion personalize exception
+     */
+    void createUser(final UserAccountBean userBean,  final String username) throws EnMeExpcetion;
+
+    /**
+     * Assign permission to user.
+     * @param userBean {@link UserAccountBean}
+     * @param permissionBean {@link UnitPermission}
+     * @throws EnMeExpcetion exception
+     */
+    void assignPermission(
+            final UserAccountBean userBean,
+            final UnitPermission permissionBean)
+            throws EnMeExpcetion;
+
+    /**
+     * Remove {@link Group} from User.
+     * @param userBean {@link UserAccountBean}
+     * @param groupBean {@link UnitGroupBean}
+     * @throws EnMeExpcetion
+     */
+    void removeGroupFromUser(
+            final UserAccountBean userBean,
+            final UnitGroupBean groupBean)
+            throws EnMeExpcetion;
+
+    /**
+     * Load Permission domain and covert to permission bean.
+     * @param permission permission
+     * @return permission bean
+     * @throws EnMeExpcetion excepcion
+     */
+    UnitPermission loadBeanPermission(final EnMePermission  permission)
+    throws EnMeExpcetion;
+
+    /**
+     * Load domain permission.
+     * @param permission permission
+     * @return permission domain
+     */
+    Permission loadPermission(final String permission);
+
+    /**
+     * Invite some users to register in the system.
+     * @param email list of users
+     * @param code code
+     * @throws Exception
+     * @throws Exception excepcion
+     */
+    void inviteUser(String email, String code) throws Exception;
+
+    /**
+     * Generate hash code invitation.
+     * @return generated code
+     */
+    String generateHashCodeInvitation();
+
+
+    /**
+     * Find {@link UserAccount} by UserName
+     * @param username user name
+     * @return {@link UserAccount}
+     */
+    UserAccount findUserByUserName(final String username);
+
+    /**
+     * Find {@link UserAccount} by email.
+     * @param email
+     * @return
+     */
+    UserAccount findUserAccountByEmail(final String email);
+
+    /**
+     * Setter.
+     * @param suspendedNotification suspended notification
+     */
+    void setSuspendedNotification(final Boolean suspendedNotification);
+
+
+    /**
+     * Load Groups by Client.
+     * @return
+     * @throws EnMeNoResultsFoundException
+     */
+    List<UnitGroupBean> loadGroups(final String currentUsername) throws EnMeNoResultsFoundException;
+
+    /**
+     * SingUp User
+     * @param singUpBean {@link SignUpBean}.
+     * @return {@link UserAccountBean}.
+     */
+    UserAccountBean singupUser(final SignUpBean singUpBean);
+
+    /**
+     * Search {@link UserAccount} by email.
+     * @param email email
+     * @return
+     */
+    List<UserAccount> searchUsersByEmail(final String email);
+
+    /**
+     * Search List of User By Username
+     * @param username username
+     * @return
+     */
+    List<UserAccount> searchUsersByUsername(final String username);
+
+    /**
+     * Load list of {@link Permission}.
+     * @return list of permissions.
+     */
+    List<UnitPermission> loadPermissions();
+
+    /**
+     * Send password to user.
+     * @param email email
+     * @param password password
+     * @throws MailSendException
+     */
+    void sendUserPassword(final String email,
+            final String password)
+            throws MailSendException;
+
+    /**
+     * Find {@link UserAccount} by UserName
+     * @param username user name
+     * @return {@link UserAccount}
+     */
+    UserAccountBean findUserByEmail(final String email);
+
+    /**
+     * Get Email List by Username.
+     * @param username
+     * @return
+     * @throws EnMeNoResultsFoundException
+     */
+    List<UnitLists> getListbyUsername(final String username) throws EnMeNoResultsFoundException;
+
+    /**
+     * Assign Permission,
+     * @param userId user id
+     * @param permission {@link EnMePermission}.
+     * @param loggedUse user logged.
+     * @throws EnMeExpcetion exception.
+     */
+    void updatePermission(
+            final Long userId,
+            final String loggedUser,
+            final EnMePermission permission,
+            final String action)
+            throws EnMeExpcetion;
+
+    /**
+     * Get Group by Id and User Id.
+     * @param groupId
+     * @param username
+     * @return
+     * @throws EnMeNoResultsFoundException
+     */
+    Group getGroupbyIdandUser(final Long groupId, final String username) throws EnMeNoResultsFoundException;
+
+    /**
+     * User Bean.
+     * @param user
+     * @return
+     */
+    void getStatsByUsers(final UserAccountBean user);
+
+    /**
+     * Get User by Group.
+     * @param secGroupId
+     * @param username
+     * @return
+     */
+    Long getUserbyGroup(final Long groupId, final String username)throws EnMeNoResultsFoundException;
+
+    /**
+     * Count Users by Groups
+     * @param username
+     * @param groupId
+     * @return
+     */
+    List<Object[]> countUsersbyGroups(final Long groupId, final String username);
+
+    /**
+     * Change User Status.
+     * @param username
+     * @throws EnmeFailOperation
+     */
+    void changeUserStatus(final String username) throws EnmeFailOperation;
+
+    /**
+     * Update property for user account.
+     * @param property
+     * @param value
+     * @param username
+     * @throws EnMeNoResultsFoundException
+     */
+    void upadteAccountProfile(
+            final Profile property,
+            final String value,
+            final String username) throws EnMeNoResultsFoundException;
+
+    /**
+     * Update Account Profile.
+     * @param bio
+     * @param email
+     * @param username
+     * @param language
+     * @param completeName
+     * @throws EnMeNoResultsFoundException
+     */
+    void upadteAccountProfile(
+            final String bio,
+            final String language,
+            final String completeName,
+            final String loggedUsername) throws EnMeNoResultsFoundException;
+
+    /**
+     * User Account Is Activated.
+     * @param signUpBean
+     * @return
+     */
+    Boolean isActivated(final SignUpBean signUpBean);
+
+    /**
+     * Add Followers.
+     * @param myUser
+     * @param followerUser
+     * @return
+     * @throws EnMeNoResultsFoundException
+     */
+    UserAccount addFollower(final String myUser, final String followerUser) throws EnMeNoResultsFoundException;
+
+   /**
+    * Follow Operations.
+    * @param userAcc
+    * @param myUsername
+    * @param followerUser
+    * @param operation
+    * @throws EnMeNoResultsFoundException
+    */
+    void followOperations(final UserAccount userAcc,
+            final String myUsername, final String followerUser,
+            final FollowOperations operation) throws EnMeNoResultsFoundException;
+}

encuestame-business/src/test/java/org/encuestame/test/business/service/TestSecurityService.java

 import java.util.List;
 
 import org.encuestame.business.service.SecurityService;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.persistence.domain.security.Group;
 import org.encuestame.persistence.domain.security.Permission;
 import org.encuestame.persistence.domain.security.Account;
 
     /** {@link SecurityService}. **/
     @Autowired
-    private ISecurityService securityService;
+    private SecurityOperations securityService;
 
     /** User Primary. **/
     private Account userPrimary;

encuestame-core/src/main/java/org/encuestame/core/mail/MailService.java

  */
 package org.encuestame.core.mail;
 
-import org.encuestame.core.service.IService;
+import org.encuestame.core.service.ServiceOperations;
 import org.encuestame.utils.mail.InvitationBean;
 import org.encuestame.utils.mail.NotificationBean;
 import org.encuestame.utils.security.SignUpBean;
  * @since May 05, 2009
  * @version $Id$
  */
-public interface MailService extends IService {
+public interface MailService extends ServiceOperations {
 
     /**
      * Send a email.

encuestame-core/src/main/java/org/encuestame/core/service/IService.java

-/*
- ************************************************************************************
- * Copyright (C) 2001-2009 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.core.service;
-
-import org.encuestame.core.util.MessageSourceFactoryBean;
-
-/**
- * Service Interface.
- * @author Picado, Juan juan@encuestame.org
- * @since 29/11/2009 21:47:14
- * @version $Id$
- */
-public interface IService extends SocialOperations{
-
-    /**
-     * Getter.
-     * @return {@link MessageSourceFactoryBean}
-     */
-    public MessageSourceFactoryBean getMessageSource();
-
-    /**
-     * Setter.
-     * @param messageSource {@link MessageSourceFactoryBean}
-     */
-    public void setMessageSource(MessageSourceFactoryBean messageSource);
-
-    /**
-     * Getter by propertie Id.
-     * @param propertieId propertieId
-     * @return value of propertie
-     */
-    public String getMessageProperties(String propertieId);
-
-}

encuestame-core/src/main/java/org/encuestame/core/service/ServiceOperations.java

+/*
+ ************************************************************************************
+ * Copyright (C) 2001-2009 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.core.service;
+
+import org.encuestame.core.util.MessageSourceFactoryBean;
+
+/**
+ * Service Interface.
+ * @author Picado, Juan juan@encuestame.org
+ * @since 29/11/2009 21:47:14
+ * @version $Id$
+ */
+public interface ServiceOperations extends SocialOperations{
+
+    /**
+     * Getter.
+     * @return {@link MessageSourceFactoryBean}
+     */
+    public MessageSourceFactoryBean getMessageSource();
+
+    /**
+     * Setter.
+     * @param messageSource {@link MessageSourceFactoryBean}
+     */
+    public void setMessageSource(MessageSourceFactoryBean messageSource);
+
+    /**
+     * Getter by propertie Id.
+     * @param propertieId propertieId
+     * @return value of propertie
+     */
+    public String getMessageProperties(String propertieId);
+
+}

encuestame-mvc/src/main/java/org/encuestame/mvc/controller/BaseController.java

 import org.encuestame.business.service.imp.IPictureService;
 import org.encuestame.business.service.imp.IPollService;
 import org.encuestame.business.service.imp.IProjectService;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.business.service.imp.IServiceManager;
 import org.encuestame.business.service.imp.ISurveyService;
 import org.encuestame.business.service.imp.ITweetPollService;
      * Get {@link SecurityService}.
      * @return
      */
-    public ISecurityService getSecurityService(){
+    public SecurityOperations getSecurityService(){
         return getServiceManager().getApplicationServices().getSecurityService();
     }
 

encuestame-mvc/src/main/java/org/encuestame/mvc/controller/security/AbstractSecurityController.java

  */
 package org.encuestame.mvc.controller.security;
 
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.mvc.controller.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
 
 public abstract class AbstractSecurityController extends BaseController{
 
     /**
-     * {@link ISecurityService}.
+     * {@link SecurityOperations}.
      */
-    private ISecurityService securityService;
+    private SecurityOperations securityService;
 
     /**
      * @return the securityService
      */
-    public ISecurityService getSecurityService() {
+    public SecurityOperations getSecurityService() {
         return securityService;
     }
 
      * @param securityService the securityService to set
      */
     @Autowired
-    public void setSecurityService(final ISecurityService securityService) {
+    public void setSecurityService(final SecurityOperations securityService) {
         this.securityService = securityService;
     }
 }

encuestame-mvc/src/main/java/org/encuestame/mvc/controller/settings/SettingsJsonController.java

 import org.codehaus.jackson.JsonGenerationException;
 import org.codehaus.jackson.map.JsonMappingException;
 import org.encuestame.business.service.SecurityService.Profile;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.mvc.controller.AbstractJsonController;
 import org.encuestame.mvc.validator.ValidateOperations;
 import org.encuestame.persistence.domain.security.UserAccount;
         log.debug("update profile type:"+type);
         log.debug("update profile data:"+data);
         try {
-            final ISecurityService security = getSecurityService();
+            final SecurityOperations security = getSecurityService();
             final ValidateOperations operations = new ValidateOperations(security);
             final HashMap<String, Object> listError = new HashMap<String, Object>();
             //filter data
             HttpServletResponse response) throws JsonGenerationException,
             JsonMappingException, IOException {
         try {
-            final ISecurityService security = getSecurityService();
+            final SecurityOperations security = getSecurityService();
             final UserAccount account = getUserAccount();
             final ValidateOperations operations = new ValidateOperations(security);
             final HashMap<String, Object> listError = new HashMap<String, Object>();

encuestame-mvc/src/main/java/org/encuestame/mvc/controller/social/facebook/FacebookConnectSignIn.java

  */
 package org.encuestame.mvc.controller.social.facebook;
 
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.business.service.social.connect.IFacebookSocialService;
 import org.encuestame.core.exception.EnMeNoSuchAccountConnectionException;
 import org.encuestame.mvc.controller.social.AbstractSocialController;

encuestame-mvc/src/main/java/org/encuestame/mvc/validator/SignUpBeanValidator.java

 
 import org.apache.log4j.Logger;
 import org.encuestame.business.service.SecurityService;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.utils.security.SignUpBean;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.binding.message.MessageBuilder;
      * Reference to {@link SecurityService}.
      */
     @Autowired
-    private ISecurityService securityService;
+    private SecurityOperations securityService;
 
     /**
      * Validate SignUn Bean.
     /**
      * @return the securityService
      */
-    public ISecurityService getSecurityService() {
+    public SecurityOperations getSecurityService() {
         return securityService;
     }
 
     /**
      * @param securityService the securityService to set
      */
-    public void setSecurityService(final ISecurityService securityService) {
+    public void setSecurityService(final SecurityOperations securityService) {
         this.securityService = securityService;
     }
 }

encuestame-mvc/src/main/java/org/encuestame/mvc/validator/ValidateOperations.java

 import net.tanesha.recaptcha.ReCaptchaResponse;
 
 import org.apache.log4j.Logger;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.core.util.ValidationUtils;
 import org.encuestame.persistence.domain.security.Account;
 import org.encuestame.persistence.domain.security.UserAccount;
      *
      * @param securityService
      */
-    public ValidateOperations(final ISecurityService securityService) {
+    public ValidateOperations(final SecurityOperations securityService) {
         this.securityService = securityService;
     }
 
      * @param securityService
      * @param currentUser
      */
-    public ValidateOperations(final ISecurityService securityService, final UserAccount currentUser) {
+    public ValidateOperations(final SecurityOperations securityService, final UserAccount currentUser) {
         this.securityService = securityService;
         this.userAccount = currentUser;
     }
 
-    private ISecurityService securityService;
+    private SecurityOperations securityService;
 
     /**
      *
     /**
      * @return the securityService
      */
-    public ISecurityService getSecurityService() {
+    public SecurityOperations getSecurityService() {
         return securityService;
     }
 
     /**
      * @param securityService the securityService to set
      */
-    public void setSecurityService(final ISecurityService securityService) {
+    public void setSecurityService(final SecurityOperations securityService) {
         this.securityService = securityService;
     }
 

encuestame-mvc/src/main/java/org/encuestame/mvc/view/TweetPollController.java

 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.encuestame.business.service.imp.ISecurityService;
+import org.encuestame.business.service.imp.SecurityOperations;
 import org.encuestame.mvc.controller.BaseController;
 import org.encuestame.mvc.validator.ValidateOperations;
 import org.encuestame.persistence.domain.survey.TweetPollSwitch;
              log.info("recaptcha_challenge_field "+challenge);
              log.info("recaptcha_rforgotesponse_field "+response);
              log.info("vote_code "+code);
-             final ISecurityService securityService = getServiceManager().getApplicationServices().getSecurityService();
+             final SecurityOperations securityService = getServiceManager().getApplicationServices().getSecurityService();
              final ReCaptchaResponse reCaptchaResponse = getReCaptcha().checkAnswer(req.getRemoteAddr(), challenge, response);
              final ValidateOperations validation = new ValidateOperations(securityService);
              validation.validateCaptcha(reCaptchaResponse, result);

encuestame-persistence/src/main/java/org/encuestame/persistence/dao/imp/AccountDaoImp.java

      * @return
      */
     public SocialAccount getSocialAccount(final Long socialAccountId, final Account account){
+        log.debug("account "+account.getUid());
+        log.debug("socialAccountId "+socialAccountId);
         final DetachedCriteria criteria = DetachedCriteria.forClass(SocialAccount.class);
         criteria.add(Restrictions.eq("secUsers", account));
-        criteria.add(Restrictions.eq("socialUserId", socialAccountId));
+        criteria.add(Restrictions.eq("id", socialAccountId));
         return (SocialAccount) DataAccessUtils.uniqueResult(getHibernateTemplate().findByCriteria(criteria));
     }
 

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons.js

 encuestame.service.social.twitter.authorize = encuestame.contextWidget()+"/api/social/twitter/authorize/url.json";
 encuestame.service.social.twitter.confirm = encuestame.contextWidget()+"/api/social/twitter/authorize/confirm.json";
 encuestame.service.social.twitter.create = encuestame.contextWidget()+"/api/social/twitter/account/create.json";
+
+encuestame.service.social.twitter.defaultState = encuestame.contextWidget()+"/api/social/twitter/account/default.json";
+encuestame.service.social.twitter.remove = encuestame.contextWidget()+"/api/social/twitter/account/remove.json";
+encuestame.service.social.twitter.valid = encuestame.contextWidget()+"/api/social/twitter/account/valid.json";
+
 encuestame.service.social.facebook = {};
 encuestame.service.social.linkedIn = {};

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/dialog/Confirm.js

+dojo.provide("encuestame.org.core.commons.dialog.Confirm");
+
+dojo.require("encuestame.org.core.commons.dialog.Dialog");
+dojo.require("dijit.form.Button");
+
+dojo.declare(
+    "encuestame.org.core.commons.dialog.Confirm",
+    [encuestame.org.core.commons.dialog.Dialog],{
+        //templatePath: dojo.moduleUrl("encuestame.org.core.commons.dialog", "templates/dialog.inc"),
+
+        draggable : false,
+
+        _question : "Do you want confirm your action?",
+
+        /*
+         * post create.
+         */
+        postCreate : function(){
+            this.inherited(arguments);
+            this.containerNode.appendChild(this._createContent());
+            this.titleNode.innerHTML = this._question;
+        },
+
+        functionYes : function(){
+            console.debug("functionYes");
+        },
+
+        functionNo : function(){
+            this.hide();
+        },
+
+        /*
+         * Confirm dom node content.
+         * @returns
+         */
+        _createContent : function(){
+            var div =  dojo.doc.createElement('div');
+            var buttonYes = new dijit.form.Button({
+                label: "Confirm",
+                onClick: dojo.hitch(this, function() {
+                    this.functionYes();
+                })
+            });
+            div.appendChild(buttonYes.domNode);
+            var buttonNo = new dijit.form.Button({
+                label: "Cancel",
+                onClick: dojo.hitch(this, function() {
+                    this.functionNo();
+                })
+            });
+            div.appendChild(buttonNo.domNode);
+            console.debug("div", div);
+            return div;
+        }
+});

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/dialog/Dialog.js

+dojo.provide("encuestame.org.core.commons.dialog.Dialog");
+
+dojo.require("dijit.Dialog");
+
+dojo.declare(
+    "encuestame.org.core.commons.dialog.Dialog",
+    [dijit.Dialog],{
+        templatePath: dojo.moduleUrl("encuestame.org.core.commons.dialog", "templates/dialog.inc"),
+
+        draggable : false
+});
+

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/dialog/templates/dialog.inc

+<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">
+    <div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">
+    <span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>
+    <span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">
+        <span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>
+    </span>
+    </div>
+        <div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>
+</div>

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/form/Button.js

Empty file added.

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons/social/SocialAccounts.js

 dojo.require("dijit.form.Select");
 dojo.require("dijit.form.Button");
 dojo.require("dijit.form.Form");
+dojo.require("encuestame.org.core.commons.dialog.Dialog");
+dojo.require("encuestame.org.core.commons.dialog.Confirm");
 
 dojo.require("dojo.hash");
 
 
         widgetsInTemplate: true,
 
-        domain : "",
-
-        postCreate : function(){
-              console.debug("domain", this.domain);
-        }
+        domain : ""
 });
 
+/*
+ * Social Button Widget.
+ */
 dojo.declare(
         "encuestame.org.core.commons.social.SocialButton",
         [dijit._Widget, dijit._Templated],{
             },
 
             _loadAccountInterface : function(id){
-                console.debug("_loadAccountInterface ", id.toLowerCase()+"Detail");
+                //console.debug("_loadAccountInterface ", id.toLowerCase()+"Detail");
                 var widget = dijit.byId(id.toLowerCase()+"Detail");
-                console.debug("widget ", widget);
+                //console.debug("widget ", widget);
                 dojo.publish("/encuestame/social/change", [widget]);
                 dojo.publish("/encuestame/social/"+id+"/loadAccounts");
             },
 
             _click : function(event){
                 var hash = dojo.queryToObject(dojo.hash());
-                console.debug("click button");
+                //console.debug("click button");
                 this._loadAccountInterface(this.id);
                 params = {
                    provider : this.id
             }
  });
 
+/*
+ * Social Account Detail Widget.
+ */
 dojo.declare(
         "encuestame.org.core.commons.social.SocialAccountDetail",
         [dijit._Widget, dijit._Templated],{
 
             postCreate : function(){
                 dojo.subscribe("/encuestame/social/change", this, function(type){
-                    console.debug(this.id, type.id);
-                    if(this.id == type.id){
-                        console.debug("Si");
+                    //console.debug(this.id, type.id);
+                    if (this.id == type.id) {
                         dojo.removeClass(this.domNode, "defaultDisplayHide");
                     } else {
-                        console.debug("No");
                         dojo.addClass(this.domNode, "defaultDisplayHide");
 
                     }
                  });
+                dojo.subscribe("/encuestame/social/list/reload", this, "_callListSocialAccounts");
             },
 
             _callListSocialAccounts : function(){
 
             postCreate : function(){
                 dojo.subscribe("/encuestame/social/twitter/loadAccounts", this, "_callTwitterAccounts");
+                dojo.subscribe("/encuestame/social/twitter/create/reset", this, "_resetCreateAccount");
                 this.inherited(arguments);
             },
 
+            /*
+             * call twitter accounts.
+             */
             _callTwitterAccounts : function(){
                 this._callListSocialAccounts();
             },
 
+            /*
+             * call authorize url.
+             */
             _callAuthorizeUrl : function(){
                 var load = dojo.hitch(this, function(data){
-                   console.debug("data", data);
                    this._openAuthorizeWindow(data.success.url);
+                   this._moveStep2();
                 });
                 var error = function(error) {
                     console.debug("error", error);
             },
 
             /*
-             *
+             * Call and open authorize window.
              */
             _autorizeOpen : function(event){
                 dojo.stopEvent(event);
-                console.debug("_autorizeOpen");
                 this._callAuthorizeUrl();
             },
 
             /*
-             * validate pin.
+             * Validate oauth pin.
              */
             _validatePin : function(event){
                 dojo.stopEvent(event);
                 var load = dojo.hitch(this, function(data){
                     console.debug("data", data);
+                    dojo.publish("/encuestame/social/list/reload");
+                    dojo.publish("/encuestame/social/twitter/create/reset");
                  });
                  var error = function(error) {
                      console.debug("error", error);
                  }
             },
 
+            /*
+             * Reset twitter detail widget.
+             */
+            _resetCreateAccount : function(){
+                this._menu = true;
+                this._changeStateTopMenu();
+                this._moveStep1();
+            },
+
+            _moveStep1 : function(){
+                dojo.addClass(dojo.byId("twitter_step2"), "defaultDisplayHide");
+                dojo.removeClass(dojo.byId("twitter_step1"), "defaultDisplayHide");
+                dijit.byId("_pin").set("value","");
+              },
+
+            _moveStep2 : function(){
+              dojo.removeClass(dojo.byId("twitter_step2"), "defaultDisplayHide");
+              dojo.addClass(dojo.byId("twitter_step1"), "defaultDisplayHide");
+            },
+
+            /*
+             * Change authorize form.
+             */
             _autorize : function(event){
                 dojo.stopEvent(event);
+                this._changeStateTopMenu();
+            },
+
+            /*
+             * Hide or show
+             */
+            _changeStateTopMenu : function(){
                 if (this._menu) {
                     this._addTitle.innerHTML = "Authorize Account";
                     dojo.addClass(dijit.byId("twitterNewAccountForm").domNode, "defaultDisplayHide");
             },
 
             /*
-             * list twitter account.s
+             * Display list of accounts on dom node.
              */
             _printListOfAccounts : function(listAccounts){
                 console.debug("list accounts", listAccounts);
              },
 
              /*
-              *
+              * Create twitter account row on dom node.
               */
              _createTwitterAccount : function(twitterAccount){
                  var widget = new encuestame.org.core.commons.social.SocialAccountRow(
                              account : twitterAccount
                           }
                          );
-                 console.debug("_createTwitterAccount", widget);
                  return widget;
              }
  });
 
+/*
+ * Social Account Row Widget.
+ */
 dojo.declare(
         "encuestame.org.core.commons.social.SocialAccountRow",
         [dijit._Widget, dijit._Templated],{
 
             },
 
+            /*
+             * open dialog.