Examples of OperationType


Examples of br.gov.frameworkdemoiselle.annotation.OperationType

          // operação.

          Class<?>[] parameterTypes = method.getParameterTypes();
          Annotation[][] parameterAnnotations = method.getParameterAnnotations();
          ParameterDetail[] parameterDetails = new ParameterDetail[parameterTypes.length];
          OperationType operationType = opAnnotation.type();

          for (int i = 0; i < parameterTypes.length; i++) {
            OperationParameter paramAnnotation = null;
            for (Annotation annotation : parameterAnnotations[i]) {
              if (annotation.annotationType() == OperationParameter.class) {
View Full Code Here

Examples of co.cubicode.rbacframework.models.catalogs.OperationType

  @Test
  public void findByPrimaryKeyTest() {
    Application application = Catalog.getElement(Application.class, ApplicationConstants.ADMIN);
    ObjectType objectType = Catalog.getElement(ObjectType.class, ObjectTypeConstants.USER);
    OperationType operationType = Catalog.getElement(OperationType.class, OperationType.CREATE);
    Permission permission = null;
    try {
      permission = PermissionBiz.findByPrimaryKey(application, objectType, operationType);
    } catch (ObjectNotFoundException e) {
      e.printStackTrace();
View Full Code Here

Examples of com.fasterxml.clustermate.api.OperationType

        return _urlEncoder.decode(encodedPath);
    }

    protected static OperationType _resolveOperation(String desc, OperationType defType)
    {
        OperationType type = _operationTypes.get(desc);
        return (type == null) ? defType : type;
    }
View Full Code Here

Examples of com.google.wave.api.OperationType

      // expected
    }
  }

  public void testRegister() throws Exception {
    OperationType operationType = OperationType.BLIP_CONTINUE_THREAD;
    DoNothingService doNothingService = DoNothingService.create();
    operationAccessor.register(operationType, doNothingService);
    OperationService service = operationAccessor.getServiceFor(operationType);
    assertEquals(doNothingService, service);
  }
View Full Code Here

Examples of com.google.wave.api.OperationType

    // Set up participant containers.
    List<String> participantsAdded = Lists.newArrayList();
    List<String> participantsRemoved = Lists.newArrayList();

    OperationType type = OperationUtil.getOperationType(operation);
    switch (type) {
      case WAVELET_ADD_PARTICIPANT_NEWSYNTAX:
        // Make sure targetParticipant is not already member.
        if (conversation.getParticipantIds().contains(targetParticipant)) {
          String message = targetParticipant.getAddress() + " is already a " + "member of wavelet";
          LOG.info(message);
          throw new InvalidRequestException(message, operation);
        }

        // Add participant to conversation and send event.
        conversation.addParticipant(targetParticipant);
        participantsAdded.add(targetParticipant.getAddress());
        event =
            new WaveletParticipantsChangedEvent(null, null, participant.getAddress(),
                System.currentTimeMillis(), rootBlipId, participantsAdded, participantsRemoved);
        break;
      case WAVELET_REMOVE_PARTICIPANT_NEWSYNTAX:
        // Make sure targetParticipant is already member.
        if (!conversation.getParticipantIds().contains(targetParticipant)) {
          // Not a member, throw invalid request.
          String message = targetParticipant.getAddress() + " is not a " + "member of wavelet";
          LOG.info(message);
          throw new InvalidRequestException(message, operation);
        }

        // Remove participant and send event.
        conversation.removeParticipant(targetParticipant);
        participantsRemoved.add(targetParticipant.getAddress());

        event =
            new WaveletParticipantsChangedEvent(null, null, participant.getAddress(),
                System.currentTimeMillis(), rootBlipId, participantsAdded, participantsRemoved);
        break;
      default:
        throw new UnsupportedOperationException(
            "This OperationService does not implement operation of type " + type.method());
    }

    // Process the participant event.
    context.processEvent(operation, event);
  }
View Full Code Here

Examples of com.google.wave.api.OperationType

    } catch (InvalidIdException e) {
      throw new InvalidRequestException("Invalid conversation id", operation, e);
    }
    ObservableConversation conversation = conversationView.getConversation(conversationId);

    OperationType type = OperationUtil.getOperationType(operation);
    switch (type) {
      case BLIP_CONTINUE_THREAD:
        continueThread(operation, context, participant, conversation);
        break;
      case BLIP_CREATE_CHILD:
        createChild(operation, context, participant, conversation);
        break;
      case WAVELET_APPEND_BLIP:
        appendBlip(operation, context, participant, conversation);
        break;
      case DOCUMENT_APPEND_INLINE_BLIP:
        appendInlineBlip(operation, context, participant, wavelet, conversation);
        break;
      case DOCUMENT_APPEND_MARKUP:
        appendMarkup(operation, context, participant, wavelet, conversation);
        break;
      case DOCUMENT_INSERT_INLINE_BLIP:
        insertInlineBlip(operation, context, participant, wavelet, conversation);
        break;
      case DOCUMENT_INSERT_INLINE_BLIP_AFTER_ELEMENT:
        insertInlineBlipAfterElement(operation, context, participant, wavelet, conversation);
        break;
      case BLIP_DELETE:
        delete(operation, context, participant, conversation);
        break;
      default:
        throw new UnsupportedOperationException(
            "This OperationService does not implement operation of type " + type.method());
    }
  }
View Full Code Here

Examples of com.lightcrafts.model.OperationType

    // Find the user presentable version of the given slider or
    // checkbox key in the properties.  If none is configured, just
    // return the given String.
    private String getUserPresentableKey(String key) {
        OperationType type = op.getType();
        String name = type.getName();
        name = name.replaceAll(" ", "");
        String propKey = name + "-" + key;
        try {
            return Resources.getString(propKey);
        }
View Full Code Here

Examples of com.lightcrafts.model.OperationType

    // (as found, for instance, in opActions.properties) into help topics
    // (as defined in HelpConstants).
    //
    // This mapping needs maintenance, as tools come and go.
    protected String getHelpTopic() {
        OperationType type = op.getType();
        String name = type.getName();
        if (name.startsWith("ZoneMapper")) {
            return HelpConstants.HELP_TOOL_ZONEMAPPER;
        }
        if (name.startsWith("UnSharp Mask")) {
            return HelpConstants.HELP_TOOL_SHARPEN;
View Full Code Here

Examples of com.lightcrafts.model.OperationType

        ImageMetadata meta = doc.getMetadata();
        ImageType type = meta.getImageType();
        if (type instanceof RawImageType) {
            if (! doc.hasRawAdjustments()) {
                Engine engine = doc.getEngine();
                OperationType rawType = engine.getRawAdjustmentsOperationType();
                Editor editor = doc.getEditor();
                editor.addControl(rawType, 0);
                doc.discardEdits();
                doc.markClean();
            }
View Full Code Here

Examples of com.lightcrafts.model.OperationType

    List<Action> getActions() {
        return new LinkedList<Action>(actions);
    }

    static String getName(Operation op) {
        OperationType type = op.getType();
        return getName(type);
    }
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.