Examples of RoleId


Examples of it.unito.di.artifact.RoleId

      Commitment c = (Commitment) e.getElementChanged();
      if (c.getLifeCycleStatus() == LifeCycleState.CONDITIONAL) {
        try {
          if (c.getCreditor().equals(participant.getRoleId())
              && c.getDebtor().equals(
                  new RoleId(
                      CNPArtifactTimerMaxPart.INITIATOR_ROLE,
                      RoleId.GENERIC_ROLE))
              && c.getConsequent().equals(
                  new CompositeExpression(
                      LogicalOperatorType.OR,
                      new Fact("accept"), new Fact(
                          "reject")))) {
            myAgent.addBehaviour(commitToDoneOrFailureIfAccept());
          }
        } catch (MissingOperandException
            | WrongOperandsNumberException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        }
      }

      else if (c.getLifeCycleStatus() == LifeCycleState.DETACHED) {
        try {
          if (c.getDebtor().equals(participant.getRoleId())
              && c.getCreditor().equals(
                  new RoleId(
                      CNPArtifactTimerMaxPart.INITIATOR_ROLE,
                      RoleId.GENERIC_ROLE))
              && c.getConsequent().equals(
                  new CompositeExpression(
                      LogicalOperatorType.OR,
View Full Code Here

Examples of it.unito.di.artifact.RoleId

 
  @OPERATION
  public void cfp(Task task, RoleId initiator) {
   
     CAMessage cfp = new CAMessage();
     RoleId dest = new RoleId(PARTICIPANT_ROLE, RoleId.GENERIC_ROLE);
    cfp.setContents(task);
    cfp.setRoleSender(initiator);
    cfp.setRoleReceiver(dest);
    cfp.setPerformative(ACLMessage.CFP);
    send(cfp);
View Full Code Here

Examples of it.unito.di.artifact.RoleId

 
  @INTERNAL_OPERATION void startTiming() {
    await_time(maxTime);
    acceptingProposals = false;
    logger.debug("Not accepting proposals anymore");
    RoleId groupParticipant = new RoleId(PARTICIPANT_ROLE, RoleId.GROUP_ROLE);
    try {
      createCommitment(new Commitment(initiatorId, groupParticipant, new CompositeExpression(
          LogicalOperatorType.OR, new Fact("accept"), new Fact("reject"))));
    } catch (MissingOperandException | WrongOperandsNumberException e) {
      // TODO Auto-generated catch block
View Full Code Here

Examples of it.unito.di.artifact.RoleId

 
  @OPERATION
  public void accept(Proposal proposal, RoleId initiator) {
   
    CAMessage accept = new CAMessage();
     RoleId dest = proposal.getRoleId();
     accept.setRoleSender(initiator);
     accept.setRoleReceiver(dest);
     accept.setPerformative(ACLMessage.ACCEPT_PROPOSAL);
    send(accept);
   
View Full Code Here

Examples of it.unito.di.artifact.RoleId

 
  @OPERATION
  public void reject(Proposal proposal, RoleId initiator) {
   
    CAMessage reject = new CAMessage();
     RoleId dest = proposal.getRoleId();
     reject.setRoleSender(initiator);
     reject.setRoleReceiver(dest);
     reject.setPerformative(ACLMessage.REJECT_PROPOSAL);
    send(reject);
   
View Full Code Here

Examples of it.unito.di.artifact.RoleId

        Commitment c = (Commitment) e.getElementChanged();
        if (c.getLifeCycleStatus() == LifeCycleState.CONDITIONAL) {
          try {
            if (c.getCreditor().equals(participant.getRoleId())
                && c.getDebtor().equals(
                    new RoleId(
                        CNPArtifactTimerMaxPart.INITIATOR_ROLE,
                        RoleId.GENERIC_ROLE))
                && c.getConsequent().equals(
                    new CompositeExpression(
                        LogicalOperatorType.OR,
                        new Fact("accept"), new Fact(
                            "reject")))) {
              myAgent.addBehaviour(new CommitToDoneOrFailureIfAccept(participant, this));
            }
          } catch (MissingOperandException
              | WrongOperandsNumberException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
          }
        }

        else if (c.getLifeCycleStatus() == LifeCycleState.DETACHED) {
          try {
            if (c.getDebtor().equals(participant.getRoleId())
                && c.getCreditor().equals(
                    new RoleId(
                        CNPArtifactTimerMaxPart.INITIATOR_ROLE,
                        RoleId.GENERIC_ROLE))
                && c.getConsequent().equals(
                    new CompositeExpression(
                        LogicalOperatorType.OR,
View Full Code Here

Examples of it.unito.di.artifact.RoleId

 
  @OPERATION
  public void cfp(Task task, RoleId initiator) {
   
     CAMessage cfp = new CAMessage();
     RoleId dest = new RoleId(PARTICIPANT_ROLE, RoleId.GENERIC_ROLE);
    cfp.setContents(task);
    cfp.setRoleSender(initiator);
    cfp.setRoleReceiver(dest);
    cfp.setPerformative(ACLMessage.CFP);
    send(cfp);
View Full Code Here

Examples of it.unito.di.artifact.RoleId

 
  @OPERATION
  public void accept(Proposal proposal, RoleId initiator) {
   
    CAMessage accept = new CAMessage();
     RoleId dest = proposal.getRoleId();
     accept.setRoleSender(initiator);
     accept.setRoleReceiver(dest);
     accept.setPerformative(ACLMessage.ACCEPT_PROPOSAL);
    send(accept);
   
View Full Code Here

Examples of org.jitterbit.integration.client.server.RoleId

            //
            int nUsers = m_userPermissions.size();
            CUserPermissions[] userPermissions = new CUserPermissions[nUsers];
            int iUser = 0;
            for (Map.Entry<RoleId, List<CPermission>> entry : m_userPermissions.entrySet()) {
                RoleId userId = entry.getKey();
                userPermissions[iUser++] = new CUserPermissions(userId.toString(), getPermissions(entry.getValue()));
            }

            PermissionsHolder permissionsHolder = new PermissionsHolder();
            permissionsHolder.setUserPermissions(userPermissions);
            updatedData.setPermissions(permissionsHolder);
View Full Code Here

Examples of org.platformlayer.model.RoleId

      throw new CliException(msg);
    }
    if (Strings.isNullOrEmpty(roleKey)) {
      throw new CliException("Role is required");
    }
    RoleId role = new RoleId(roleKey);
    userRepository.addUserToProject(username.getKey(), project.getName(), projectSecret,
        Collections.singletonList(role));

    return project;
  }
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.