/** * Create a placeholder {@link Action} associated with the given {@code Resource}, which is used to procreate an * AnyActionBuilder for the {@code Resource}. */ private static Action asAnyAction(final Resource resource) { final Action anyAction = new Action(); anyAction.setResource(resource); return anyAction; }
@Override public Map<ActionType, Action> resolve(final Resource resource) { final ImmutableMap.Builder<ActionType, Action> actions = ImmutableMap.builder(); for (final Method m : resource.getMethods()) { final Action action = new Action(); action.setDescription(m.getDescription()); action.setBody(bodyParamResolver.resolve(m)); action.setQueryParameters(queryParamsResolver.resolve(getParametersFor(m.getParameters(), ParameterType.QUERY))); action.setHeaders(headerParamsResolver.resolve(getParametersFor(m.getParameters(), ParameterType.HEADER))); // action.setResource(); action.setResponses(responseResolver.resolve(m)); actions.put(getActionType(m.getMethodType()), action); } return actions.build(); }
ramlResource.setActions(new LinkedHashMap<ActionType, Action>()); for (Operation operation : resource.getOperations()) { action = new Action(); action.setDescription(operation.getDescription()); action.setResource(ramlResource);
ramlResource.setActions(new LinkedHashMap<ActionType, Action>()); for (Operation operation : resource.getOperations()) { action = new Action(); action.setDescription(operation.getDescription()); action.setResource(ramlResource);
ramlResource.setActions(new LinkedHashMap<ActionType, Action>()); for (Operation operation : resource.getOperations()) { action = new Action(); action.setDescription(operation.getDescription()); action.setResource(ramlResource);
ramlResource.setActions(new LinkedHashMap<ActionType, Action>()); for (Operation operation : resource.getOperations()) { action = new Action(); action.setDescription(operation.getDescription()); action.setResource(ramlResource);
ramlResource.setActions(new LinkedHashMap<ActionType, Action>()); for (Operation operation : resource.getOperations()) { action = new Action(); action.setDescription(operation.getDescription()); action.setResource(ramlResource);