Examples of PersonImpl


Examples of org.dozer.vo.inheritance.iface.PersonImpl

  public void testInterfaceInheritance_GetterSetterAtDifferentLevels() {
    mapper = getMapper(new String[] { "inheritanceMapping.xml" });

    Long id = new Long(100L);
    String name = "John";
    Person person = new PersonImpl(id, name);
    PersonDTO personDTO = mapper.map(person, PersonDTO.class);

    assertEquals("Person DTO has incorrect personId value", id, personDTO.getPersonId());
    assertNotNull("name should not be null", personDTO.getName());
    assertEquals("Person DTO has incorrect name value", name, personDTO.getName());
View Full Code Here

Examples of org.dozer.vo.inheritance.iface.PersonImpl

    Long id = new Long(100L);
    String name = "John";
    String address = "123 Main Street";

    final Person person = new PersonImpl(id, name);
    person.setAddress(address);

    PersonWithAddressDTO personWithAddressDTO = mapper.map(newInstance(new Class[] { Person.class }, person),
        PersonWithAddressDTO.class);

    assertEquals("Person DTO has incorrect personId value", id, personWithAddressDTO.getPersonId());
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

          pstmt = con.prepareStatement("SELECT USER_DFLT_USR_ID FROM UP_USER WHERE USER_ID=?");
          pstmt.setInt(1, person.getID());
          rs = pstmt.executeQuery();
          if(rs.next()) {
            int defaultProfileUser = rs.getInt(1);
            IPerson defaultProfilePerson = new PersonImpl();
            defaultProfilePerson.setID(defaultProfileUser);
            if(defaultProfilePerson.getID() != person.getID()) {
              UserProfile templateProfile = getUserProfileByFname(defaultProfilePerson,profileFname);
              if(templateProfile != null) {
                  final UserProfile newUserProfile = new UserProfile(templateProfile);
                  newUserProfile.setLayoutId(0);
                return addUserProfile(person,newUserProfile);
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

                if (userView != null) {
                    int userId  = userView.getUserId();
   
                    if ( null != ownerId )
                    {
                        IPerson p = new PersonImpl();
                        p.setID( userId );
                        p.setAttribute( "username", ownerId );
                        owners.put(p, fragmentDefinition);
                    }
                }
            }
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

       
        String ownerUsername = layout.valueOf("@username");
        IPerson person = null;
        UserProfile profile = null;
        try {
            person = new PersonImpl();
            person.setUserName(ownerUsername);
            int ownerId = identityStore.getPortalUID(person);
            if (ownerId == -1) {
                String msg = "No userId for username=" + ownerUsername;
                throw new RuntimeException(msg);
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

                        rs.next();
                        userId = rs.getInt(1);
                       
                        // get the profile ID for the default user
                        UserProfile profile = getUserProfileById(person, profileId);
                    IPerson defaultProfilePerson = new PersonImpl();
                    defaultProfilePerson.setID(userId);
                        profileId = getUserProfileByFname(defaultProfilePerson, profile.getProfileFname()).getProfileId();

                    } finally {
                        close(rs);
                    }
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

                        rs.next();
                        userId = rs.getInt(1);
                       
                        // get the profile ID for the default user
                        UserProfile profile = getUserProfileById(person, profileId);
                    IPerson defaultProfilePerson = new PersonImpl();
                    defaultProfilePerson.setID(userId);
                        profileId = getUserProfileByFname(defaultProfilePerson, profile.getProfileFname()).getProfileId();

                    } finally
                    {
                        close(rs);
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

      }
  }// setUserPassword

  public void removeUser( IPerson AnIndividual ) throws Exception {

       IPerson per= new PersonImpl();
       per.setAttribute(IPerson.USERNAME, AnIndividual.getAttribute( Constants.UNFIELD ));

       int portalUID = -1;
       try{
          portalUID = rdbmuser.getPortalUID(per, false);
       }catch(org.jasig.portal.AuthorizationException ae) { /* do nothing */ }
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

     Vector v = new Vector();
     IPerson person = null;

     while( R.next() ){

       person = new PersonImpl();

       for( int i = 1; i <= R.getMetaData().getColumnCount(); i++ ) {

           if( R.getMetaData().getColumnType( i ) != Types.TIMESTAMP )
             person.setAttribute(
                   R.getMetaData().getColumnName( i ).toLowerCase(),
                      (R.getString( i )==null?"":R.getString( i )));
            else
             person.setAttribute(
                   R.getMetaData().getColumnName( i ).toLowerCase(),
                      (R.getString( i )==null?"": RDBMServices.getDbMetaData().sqlTimeStamp(
                         new java.util.Date( R.getTimestamp( i ).getTime()) )));

       }// for

       v.addElement( person );
     }// while

     IPerson pwdtst = null;
     IPerson[] people = new IPerson[ v.size() ];
     for( int i = 0; i < people.length; i++ ) {
       people[ i ] = (IPerson)v.elementAt( i );

       // if the user exists but has no layout information, the account
       // is considered to be locked, this is technically inaccurate
       try{
         pwdtst = new PersonImpl();

         pwdtst.setAttribute( IPerson.USERNAME,
              people[ i ].getAttribute( Constants.UNFIELD ));

         rdbmuser.getPortalUID( pwdtst, false );
View Full Code Here

Examples of org.jasig.portal.security.provider.PersonImpl

@Deprecated
public class ChannelRuntimeDataToPersonConverter {

    public IPerson channelRuntimeDataToPerson( ChannelRuntimeData channelRuntimeData ) {

        IPerson newborn = new PersonImpl();
       
        for (String channelRuntimeDataParameterName : channelRuntimeData.getParameters().keySet()) {
          if (! channelRuntimeDataParameterName.equals(Constants.FORMACTION)) {
            String paramValue = channelRuntimeData.getParameter(channelRuntimeDataParameterName);
            // this null handling is required becausee PersonImpl is a HashTable
            // which does not allow null user attribute values
            if (paramValue == null) {
              paramValue = "";
            }
            newborn.setAttribute(channelRuntimeDataParameterName, paramValue);
          }
        }
      
        return newborn;
    }// crd2persion
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.