Class DefinitionsServiceEndPoint


  • @Produces("application/json;charset=UTF-8")
    @Path("/definitions")
    public class DefinitionsServiceEndPoint
    extends Object
    A JAX-RS endpoint to retrieve definition information about core context server entities such as conditions, actions and values.
    • Constructor Detail

      • DefinitionsServiceEndPoint

        public DefinitionsServiceEndPoint()
    • Method Detail

      • setDefinitionsService

        public void setDefinitionsService​(DefinitionsService definitionsService)
      • setLocalizationHelper

        public void setLocalizationHelper​(LocalizationHelper localizationHelper)
      • getAllConditionTypes

        @GET
        @Path("/conditions")
        public Collection<RESTConditionType> getAllConditionTypes​(@HeaderParam("Accept-Language")
                                                                  String language)
        Retrieves all condition types localized using the specified language.
        Parameters:
        language - the language to use to localize.
        Returns:
        a Collection of all collection types
      • getConditionTypesByTag

        @GET
        @Path("/conditions/tags/{tags}")
        public Collection<RESTConditionType> getConditionTypesByTag​(@PathParam("tags")
                                                                    String tags,
                                                                    @HeaderParam("Accept-Language")
                                                                    String language)
        Retrieves the set of condition types with the specified tags.
        Parameters:
        language - the language to use to localize.
        tags - a comma-separated list of tag identifiers
        Returns:
        the set of condition types with the specified tag
      • getConditionTypesBySystemTag

        @GET
        @Path("/conditions/systemTags/{tags}")
        public Collection<RESTConditionType> getConditionTypesBySystemTag​(@PathParam("tags")
                                                                          String tags,
                                                                          @HeaderParam("Accept-Language")
                                                                          String language)
        Retrieves the set of condition types with the specified system tags.
        Parameters:
        language - the language to use to localize.
        tags - a comma-separated list of tag identifiers
        Returns:
        the set of condition types with the specified tag
      • getConditionType

        @GET
        @Path("/conditions/{conditionId}")
        public RESTConditionType getConditionType​(@PathParam("conditionId")
                                                  String id,
                                                  @HeaderParam("Accept-Language")
                                                  String language)
        Retrieves the condition type associated with the specified identifier localized using the specified language.
        Parameters:
        language - the language to use to localize.
        id - the identifier of the condition type to retrieve
        Returns:
        the condition type associated with the specified identifier or null if no such condition type exists
      • setConditionType

        @POST
        @Path("/conditions")
        public void setConditionType​(ConditionType conditionType)
        Stores the condition type
        Parameters:
        conditionType - the condition type to store
      • removeConditionType

        @DELETE
        @Path("/conditions/{conditionTypeId}")
        public void removeConditionType​(@PathParam("conditionTypeId")
                                        String conditionTypeId)
        Removes the condition type
        Parameters:
        conditionTypeId - the identifier of the action type to delete
      • getAllActionTypes

        @GET
        @Path("/actions")
        public Collection<RESTActionType> getAllActionTypes​(@HeaderParam("Accept-Language")
                                                            String language)
        Retrieves all known action types localized using the specified language.
        Parameters:
        language - the language to use to localize.
        Returns:
        all known action types
      • getActionTypeByTag

        @GET
        @Path("/actions/tags/{tags}")
        public Collection<RESTActionType> getActionTypeByTag​(@PathParam("tags")
                                                             String tags,
                                                             @HeaderParam("Accept-Language")
                                                             String language)
        Retrieves the set of action types with the specified tags.
        Parameters:
        language - the language to use to localize.
        tags - the tag marking the action types we want to retrieve
        Returns:
        the set of action types with the specified tag
      • getActionTypeBySystemTag

        @GET
        @Path("/actions/systemTags/{tags}")
        public Collection<RESTActionType> getActionTypeBySystemTag​(@PathParam("tags")
                                                                   String tags,
                                                                   @HeaderParam("Accept-Language")
                                                                   String language)
        Retrieves the set of action types with the specified system tags.
        Parameters:
        language - the language to use to localize.
        tags - the tag marking the action types we want to retrieve
        Returns:
        the set of action types with the specified tag
      • getActionType

        @GET
        @Path("/actions/{actionId}")
        public RESTActionType getActionType​(@PathParam("actionId")
                                            String id,
                                            @HeaderParam("Accept-Language")
                                            String language)
        Retrieves the action type associated with the specified identifier localized using the specified language.
        Parameters:
        language - the language to use to localize.
        id - the identifier of the action type to retrieve
        Returns:
        the action type associated with the specified identifier or null if no such action type exists
      • setActionType

        @POST
        @Path("/actions")
        public void setActionType​(ActionType actionType)
        Stores the action type
        Parameters:
        actionType - the action type to store
      • removeActionType

        @DELETE
        @Path("/actions/{actionTypeId}")
        public void removeActionType​(@PathParam("actionTypeId")
                                     String actionTypeId)
        Removes the action type
        Parameters:
        actionTypeId - the identifier of the action type to delete
      • getAllValueTypes

        @GET
        @Path("/values")
        public Collection<RESTValueType> getAllValueTypes​(@HeaderParam("Accept-Language")
                                                          String language)
        Retrieves all known value types localized using the specified language.
        Parameters:
        language - the language to use to localize.
        Returns:
        all known value types
      • getValueTypeByTag

        @GET
        @Path("/values/tags/{tags}")
        public Collection<RESTValueType> getValueTypeByTag​(@PathParam("tags")
                                                           String tags,
                                                           @HeaderParam("Accept-Language")
                                                           String language)
        Retrieves the set of value types with the specified tags.
        Parameters:
        language - the language to use to localize.
        tags - the tag marking the value types we want to retrieve
        Returns:
        the set of value types with the specified tag
      • getValueType

        @GET
        @Path("/values/{valueTypeId}")
        public RESTValueType getValueType​(@PathParam("valueTypeId")
                                          String id,
                                          @HeaderParam("Accept-Language")
                                          String language)
        Retrieves the value type associated with the specified identifier localized using the specified language.
        Parameters:
        language - the language to use to localize.
        id - the identifier of the value type to retrieve
        Returns:
        the value type associated with the specified identifier or null if no such value type exists
      • getTypesByPlugin

        @GET
        @Path("/typesByPlugin")
        public Map<Long,​List<PluginType>> getTypesByPlugin()
        Retrieves a Map of plugin identifier to a list of plugin types defined by that particular plugin.
        Returns:
        a Map of plugin identifier to a list of plugin types defined by that particular plugin