Examples of RoleType


Examples of com.google.code.lightssh.project.party.entity.PartyRole.RoleType

        PartyRelationship pr = new PartyRelationship(
            RelationshipType.ORG_ROLLUP,fromRole,toRole );
        partyRelationshipManager.save( pr );
      }
    }else{ //修改数据
      RoleType type = types[0];
      for( RoleType item:types ){
        if( !RoleType.PARENT_ORG.equals(item))
          type = item;
      }
       
View Full Code Here

Examples of eu.nicolaslecoz.cmcc.cinema.domain.RoleType

      Elements parents = linkPersonElt.parents();
     
      if (parents != null && parents.size() > 3 && "tr".equalsIgnoreCase(parents.get(2).nodeName())) {
        role = parents.get(2).select("td").get(0).text();
      }
      RoleType roleType = RoleType.getRoleTypeByRoleInAllocine(role);
     
      if (roleType != null) {
        Personne personne = new Personne();
       
        personne.setName(nom);
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.RoleType

    vcard.setProdId(new ProdIdType("31e78c0d-fb07-479d-b6af-95a9a3f2916f"));
    vcard.setSortString(new SortStringType("JOHN"));
   
    vcard.setMailer(new MailerType("Mozilla Thunderbird"));
    vcard.setTitle(new TitleType("Generic Accountant"));
    vcard.setRole(new RoleType("Counting Money"));
   
    OrgType organizations = new OrgType();
    organizations.setOrgName("IBM");
    organizations.addOrgUnit("SUN");
    vcard.setOrg(organizations);
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.RoleType

      assertTrue(types.contains(UrlParamType.WORK));
    }
   
    //ROLE
    {
      RoleType f = vcard.getRole();
      assertEquals("Counting Money", f.getRole());
    }
   
    //BDAY
    {
      BDayType f = vcard.getBDay();
      assertEquals(1980, f.getBirthday().get(Calendar.YEAR));
      assertEquals(Calendar.MARCH, f.getBirthday().get(Calendar.MONTH));
      assertEquals(22, f.getBirthday().get(Calendar.DAY_OF_MONTH));
    }
   
    //EMAIL
    {
      List<EmailType> it = vcard.getEmails();
      assertEquals(1, it.size());
     
      EmailType f = it.get(0);
      assertEquals("john.doe@ibm.cm", f.getEmail());
     
      List<EmailParamType> types = f.getParams();
      assertEquals(2, types.size());
      assertTrue(types.contains(EmailParamType.PREF));
      assertTrue(types.contains(EmailParamType.INTERNET));
    }

    //PHOTO
    {
      List<PhotoType> it = vcard.getPhotos();
      assertEquals(1, it.size());
     
      PhotoType f = it.get(0);
      assertEquals(EncodingType.BINARY, f.getEncodingType());
      assertEquals(ImageMediaType.JPEG, f.getImageMediaType());
      assertEquals(860, f.getPhoto().length);
    }
   
    //REV
    {
      RevType f = vcard.getRev();
      Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
      c.clear();
      c.set(Calendar.YEAR, 2012);
      c.set(Calendar.MONTH, Calendar.MARCH);
      c.set(Calendar.DAY_OF_MONTH, 5);
      c.set(Calendar.HOUR_OF_DAY, 13);
      c.set(Calendar.MINUTE, 19);
      c.set(Calendar.SECOND, 33);
      Calendar actual = f.getRevision();
      assertEquals(c.getTime(), actual.getTime());
    }
   
    //custom types
    {
      List<ExtendedType> it = vcard.getExtendedTypes();
      assertEquals(6, it.size());
     
      ExtendedType f = it.get(0);
      assertEquals("X-MS-OL-DEFAULT-POSTAL-ADDRESS", f.getExtendedName());
      assertEquals("2", f.getExtendedValue());
     
      f = it.get(1);
      assertEquals("X-MS-ANNIVERSARY", f.getExtendedName());
      assertEquals("20110113", f.getExtendedValue());
     
      f = it.get(2);
      assertEquals("X-MS-IMADDRESS", f.getExtendedName());
      assertEquals("johny5@aol.com", f.getExtendedValue());

      f = it.get(3);
      assertEquals("X-MS-OL-DESIGN", f.getExtendedName());
      assertEquals("<card xmlns=\"http://schemas.microsoft.com/office/outlook/12/electronicbusinesscards\" ver=\"1.0\" layout=\"left\" bgcolor=\"ffffff\"><img xmlns=\"\" align=\"tleft\" area=\"32\" use=\"photo\"/><fld xmlns=\"\" prop=\"name\" align=\"left\" dir=\"ltr\" style=\"b\" color=\"000000\" size=\"10\"/><fld xmlns=\"\" prop=\"org\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"/><fld xmlns=\"\" prop=\"title\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"/><fld xmlns=\"\" prop=\"dept\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"/><fld xmlns=\"\" prop=\"telwork\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"><label align=\"right\" color=\"626262\">Work</label></fld><fld xmlns=\"\" prop=\"telhome\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"><label align=\"right\" color=\"626262\">Home</label></fld><fld xmlns=\"\" prop=\"email\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"/><fld xmlns=\"\" prop=\"addrwork\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"/><fld xmlns=\"\" prop=\"addrhome\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"/><fld xmlns=\"\" prop=\"webwork\" align=\"left\" dir=\"ltr\" color=\"000000\" size=\"8\"/><fld xmlns=\"\" prop=\"blank\" size=\"8\"/><fld xmlns=\"\" prop=\"blank\" size=\"8\"/><fld xmlns=\"\" prop=\"blank\" size=\"8\"/><fld xmlns=\"\" prop=\"blank\" size=\"8\"/><fld xmlns=\"\" prop=\"blank\" size=\"8\"/><fld xmlns=\"\" prop=\"blank\" size=\"8\"/></card>", f.getExtendedValue());
      assertEquals(Charset.forName("UTF-8"), f.getCharset());
     
      f = it.get(4);
      assertEquals("X-MS-MANAGER", f.getExtendedName());
      assertEquals("Big Blue", f.getExtendedValue());
     
      f = it.get(5);
      assertEquals("X-MS-ASSISTANT", f.getExtendedName());
      assertEquals("Jenny", f.getExtendedValue());
    }
   
    VCardImpl vcard2 = (VCardImpl)vcard;
   
    if(vcard2.hasErrors()) {
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.RoleType

  }
 
  @Test
  public void testBuildRoleType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setRole(new RoleType("Counting Money"));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.RoleType

   * @param vcard
   * @throws VCardParseException
   */
  private void parseRoleType(String group, String value, List<ParameterType> paramTypeList, VCardImpl vcard) throws VCardParseException {
    try {
      RoleType roleType = new RoleType();
      parseParamTypes(roleType, paramTypeList, value, VCardTypeName.ROLE);
     
      if(roleType.isQuotedPrintable()) {
        value = decodeQuotedPrintableValue(roleType, value);
      }
     
      if(group != null) {
        roleType.setGroup(group);
      }
     
      roleType.setRole(VCardUtils.unescapeString(value));
      vcard.setRole(roleType);
    }
    catch(Exception ex) {
      throw new VCardParseException("RoleType ("+VCardTypeName.ROLE.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
View Full Code Here

Examples of noNamespace.RoleType

        if (security != null) {
            RoleMappingsType roleMappings = security.getRoleMappings();
            if (roleMappings != null) {
                RoleType[] roles = roleMappings.getRoleArray();
                for (int i = 0; i < roles.length; i++) {
                    RoleType role = roles[i];
                    RealmType[] realms = role.getRealmArray();
                    for (int j = 0; j < realms.length; j++) {
                        RealmType realm = realms[j];
                        PrincipalType[] principals = realm.getPrincipalArray();
                        HashSet set = new HashSet();
                        for (int k = 0; k < principals.length; k++) {
                            PrincipalType principal = principals[k];
                            java.security.Principal p = null;
                            try {
                                Class clazz = Class.forName(principal.getClass1());
                                Constructor constructor = clazz.getDeclaredConstructor(new Class[]{String.class});
                                p = (java.security.Principal) constructor.newInstance(new Object[]{principal.getName()});
                                set.add(new RealmPrincipal(realm.getRealmName(), p));
                            } catch (InstantiationException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (IllegalAccessException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (ClassNotFoundException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (NoSuchMethodException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (InvocationTargetException e) {
                                throw new GeronimoSecurityException(e);
                            }
                        }
                        super.addRoleMapping(role.getRoleName(), set);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of noNamespace.RoleType

        if (security != null) {
            RoleMappingsType roleMappings = security.getRoleMappings();
            if (roleMappings != null) {
                RoleType[] roles = roleMappings.getRoleArray();
                for (int i = 0; i < roles.length; i++) {
                    RoleType role = roles[i];
                    RealmType[] realms = role.getRealmArray();
                    for (int j = 0; j < realms.length; j++) {
                        RealmType realm = realms[j];
                        PrincipalType[] principals = realm.getPrincipalArray();
                        HashSet set = new HashSet();
                        for (int k = 0; k < principals.length; k++) {
                            PrincipalType principal = principals[k];
                            java.security.Principal p = null;
                            try {
                                Class clazz = Class.forName(principal.getClass1());
                                Constructor constructor = clazz.getDeclaredConstructor(new Class[]{String.class});
                                p = (java.security.Principal) constructor.newInstance(new Object[]{principal.getName()});
                                set.add(new RealmPrincipal(realm.getRealmName(), p));
                            } catch (InstantiationException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (IllegalAccessException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (ClassNotFoundException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (NoSuchMethodException e) {
                                throw new GeronimoSecurityException(e);
                            } catch (InvocationTargetException e) {
                                throw new GeronimoSecurityException(e);
                            }
                        }
                        super.addRoleMapping(role.getRoleName(), set);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.acl.RoleType

        return _accountDao.findByIdIncludingRemoved(accountId);
    }

    @Override
    public RoleType getRoleType(Account account) {
        RoleType roleType = RoleType.Unknown;
        if (account == null)
            return roleType;
        short accountType = account.getType();

        // Account type to role type translation
View Full Code Here

Examples of org.apache.cloudstack.acl.RoleType

        return _accountDao.findByIdIncludingRemoved(accountId);
    }

    @Override
    public RoleType getRoleType(Account account) {
        RoleType roleType = RoleType.Unknown;
        if (account == null)
            return roleType;
        short accountType = account.getType();

        // Account type to role type translation
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.