Package com.linkedin.restli.restspec

Examples of com.linkedin.restli.restspec.ActionsSetSchema


    }
  }

  private void findModelsActionSet(ResourceSchema resourceSchema, Map<String, NamedDataSchema> foundTypes, List<NamedDataSchema> typeOrder)
  {
    ActionsSetSchema actionsSet = resourceSchema.getActionsSet();
    if (actionsSet != null)
    {
      if (actionsSet.hasActions())
      {
        for(ActionSchema actionSchema : actionsSet.getActions())
        {
          findModelsAction(actionSchema, foundTypes, typeOrder);
        }
      }
    }
View Full Code Here


      resourceActions = simpleSchema.getActions();
    }
    else if (resource.getActionsSet() != null)
    {
      resourceSchemaClass = ActionsSetSchema.class;
      ActionsSetSchema actionsSet = resource.getActionsSet();
      resourceActions = actionsSet.getActions();

      keyClass = _voidClass;
    }
    else
    {
View Full Code Here

      processEntitySchema(visitor, context, simpleSchema.getEntity());
    }
    else if (resourceSchema.hasActionsSet())
    {
      final ActionsSetSchema actionsSet = resourceSchema.getActionsSet();
      visitor.visitActionSetResource(context, actionsSet);

      processActions(visitor, context, actionsSet, actionsSet.getActions());
    }

    hierarchy.remove(hierarchy.size() - 1);
  }
View Full Code Here

  private void appendActionsModel(final ResourceSchema resourceSchema,
                                  final ResourceModel resourceModel)
  {
    appendCommon(resourceModel, resourceSchema);
    ActionsSetSchema actionsNode = new ActionsSetSchema();
    ActionSchemaArray actions = createActions(resourceModel, ResourceLevel.COLLECTION);
    if (actions.size() > 0)
    {
      actionsNode.setActions(actions);
    }
    resourceSchema.setActionsSet(actionsNode);
  }
View Full Code Here

    return null;
  }

  private static ActionSchema findActionsSetAction(ResourceSchema resourceSchema, String actionName)
  {
    final ActionsSetSchema actionsSetSchema = resourceSchema.getActionsSet();
    if (actionsSetSchema != null)
    {
      final ActionSchemaArray actions = actionsSetSchema.getActions();
      if (actions != null)
      {
        for (ActionSchema actionSchema: actions)
        {
          if (actionSchema.getName().equals(actionName))
View Full Code Here

      _entity = simple.getEntity();
    }
    else if(resourceSchema.hasActionsSet())
    {
      _type = ResourceType.ACTION_SET;
      ActionsSetSchema actionSet = resourceSchema.getActionsSet();
      _supports = new StringArray(0);
      _methods = new RestMethodSchemaArray(0);
      _finders = new FinderSchemaArray(0);;
      _actions = actionSet.hasActions() ? actionSet.getActions() : new ActionSchemaArray(0);
      _entity = null;
    }
    else
    {
      throw new IllegalArgumentException("Invalid resourceSchema, must be one of: " + EnumSet.allOf(ResourceType.class));
View Full Code Here

      AssociationSchema association = resourceSchema.getAssociation();
      return associationToResourceSpec(resourceSchema, association);
    }
    else if(resourceSchema.hasActionsSet())
    {
      ActionsSetSchema actionsSet = resourceSchema.getActionsSet();
      return actionSetToResourceSpec(actionsSet);
    }
    else if(resourceSchema.hasSimple())
    {
      SimpleSchema simple = resourceSchema.getSimple();
View Full Code Here

TOP

Related Classes of com.linkedin.restli.restspec.ActionsSetSchema

Copyright © 2018 www.massapicom. 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.