Examples of Party


Examples of com.gmail.nossr50.datatypes.party.Party

    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        switch (args.length) {
            case 2:
                Player player = (Player) sender;
                McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
                Party party = mcMMOPlayer.getParty();

                if (party.getAlly() == null) {
                    sender.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.None"));
                    return true;
                }

                PartyManager.disbandAlliance(player, party, party.getAlly());
                return true;

            default:
                sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "alliance", "disband"));
                return true;
View Full Code Here

Examples of com.gmail.nossr50.datatypes.party.Party

                if (!mcMMOTarget.getParty().getLeader().getUniqueId().equals(target.getUniqueId())) {
                    player.sendMessage(LocaleLoader.getString("Party.Target.NotOwner", targetName));
                    return true;
                }

                Party playerParty = mcMMOPlayer.getParty();

                if (playerParty.getAlly() != null) {
                    player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.AlreadyAllies"));
                    return true;
                }

                mcMMOTarget.setPartyAllianceInvite(playerParty);

                sender.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
                target.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Invite.0", playerParty.getName(), playerName));
                target.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Invite.1"));
                return true;

            default:
                sender.sendMessage(LocaleLoader.getString("Commands.Usage.3", "party", "alliance", "invite", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"));
View Full Code Here

Examples of com.gmail.nossr50.datatypes.party.Party

     *
     * @param player The player to add to the party
     * @param partyName The party to add the player to
     */
    public static void addToParty(Player player, String partyName) {
        Party party = PartyManager.getParty(partyName);

        if (party == null) {
            party = new Party(new PartyLeader(player.getUniqueId(), player.getName()), partyName);
        }

        PartyManager.addToParty(UserManager.getPlayer(player), party);
    }
View Full Code Here

Examples of com.gmail.nossr50.datatypes.party.Party

    public static boolean hasAlly(String partyName) {
        return getAllyName(partyName) != null;
    }

    public static String getAllyName(String partyName) {
        Party ally = PartyManager.getParty(partyName).getAlly();
        if (ally != null) {
            return ally.getName();
        }

        return null;
    }
View Full Code Here

Examples of com.google.code.lightssh.project.party.entity.Party

    if( ReceiveType.ALL.equals(type) ){
      return "所有人";
    }else if( ReceiveType.DEPARTMENT.equals(type)
        || ReceiveType.PERSON.equals(type)  ){
      PartyManager partyMgr = (PartyManager)SpringContextHelper.getBean( "partyManager" );
      Party party = partyMgr.get( val );
     
      return party==null?"":party.getName();
    }else if( ReceiveType.ROLE.equals(type) ){
      RoleManager roleMgr = (RoleManager)SpringContextHelper.getBean( "roleManager" );
      Role role = roleMgr.get( val );
     
      return role==null?"":role.getName();
View Full Code Here

Examples of com.google.code.lightssh.project.party.entity.Party

  public void remove(Party t, Access access) {
    Class<?> clazz = Person.class;
    if( t instanceof Organization )
      clazz = Organization.class;
   
    Party party = getDao().read(clazz,t);
    if( party != null ){
      dao.delete(party);
     
      if( access != null && isDoLog(party))
        accessManager.log(access, party, null);
View Full Code Here

Examples of com.google.code.lightssh.project.party.entity.Party

  @Override
  public void save(Party party, Access access) {
    if( party == null )
      throw new ApplicationException("数据为空,不能进行保存!");
   
    Party original = null;
    boolean inserted = StringUtil.clean( party.getIdentity() ) == null;
   
    if( party instanceof Organization && !isUniqueName( party ) )
      throw new ApplicationException("名称["+party.getName()+"]已经存在!");
   
    if( party instanceof Person ){
      Person p =  ((Person) party);
      if( p.getCountry() != null
          && StringUtils.isEmpty(p.getCountry().getIdentity()))
        p.setCountry(null);
     
      if( p.getSecondaryGeo() != null
          && StringUtils.isEmpty(p.getSecondaryGeo().getIdentity()) )
        p.setSecondaryGeo(null);
     
      if( p.getThirdGeo() != null
          && StringUtils.isEmpty(p.getThirdGeo().getIdentity()) )
        p.setThirdGeo(null);
     
      if( p.getFourthGeo() != null
          && StringUtils.isEmpty(p.getFourthGeo().getIdentity()) )
        p.setFourthGeo(null);
    }
   
    if( inserted ){
      party.setId( sequenceManager.nextSequenceNumber( party ) );
      dao.create( party );
    }else{
      Party old = dao.read( party );
      if( old != null ){
        original = old.clone();
        ReflectionUtil.assign(party, old);
        dao.update( old );
      }
    }
   
View Full Code Here

Examples of com.google.code.lightssh.project.party.entity.Party

      }
    }
   
    if( root != null ){
      for( PartyRelationship pr:list ){
        Party to = pr.getTo().getParty();
        Party from = pr.getFrom().getParty();
        if( set.contains( to ) ) //构造树
          ((Organization)to).addChild( (Organization)from );
      }
    }
   
View Full Code Here

Examples of edu.monash.merc.domain.Party

        //save the party
        List<PartyBean> partyList = mdRegistrationBean.getPartyBeans();
        // parties
        List<Party> parties = new ArrayList<Party>();
        for (PartyBean partybean : partyList) {
            Party p = null;
            if (!partybean.isFromRm()) {
                // search the party detail by the person's first name and last name from the database;
                p = getPartyByUsrNameAndEmail(partybean.getPersonGivenName(), partybean.getPersonFamilyName(), partybean.getEmail());
            } else {
                String partyKey = partybean.getPartyKey();
View Full Code Here

Examples of edu.monash.merc.domain.Party

        licence.setLicenceContents(licenceBean.getLicenceContents());
        return licence;
    }

    private Party copyPartyBeanToParty(PartyBean pb) {
        Party pa = new Party();
        pa.setPartyKey(pb.getPartyKey());
        pa.setPersonTitle(pb.getPersonTitle());
        pa.setPersonGivenName(pb.getPersonGivenName());
        pa.setPersonFamilyName(pb.getPersonFamilyName());
        pa.setUrl(pb.getUrl());
        pa.setEmail(pb.getEmail());
        pa.setAddress(pb.getAddress());
        pa.setIdentifierType(pb.getIdentifierType());
        pa.setIdentifierValue(pb.getIdentifierValue());
        pa.setOriginateSourceType(pb.getOriginateSourceType());
        pa.setOriginateSourceValue(pb.getOriginateSourceValue());
        pa.setGroupName(pb.getGroupName());
        pa.setFromRm(pb.isFromRm());
        return pa;
    }
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.