Class Items


  • public final class Items
    extends Object
    Class that represents the Items type in API descriptor.
    • Method Detail

      • getCreate

        public Create getCreate()
        Getter of Create.
        Returns:
        Create
      • getRead

        public Read getRead()
        Getter of Read.
        Returns:
        Read
      • getUpdate

        public Update getUpdate()
        Getter of Update.
        Returns:
        Update
      • getDelete

        public Delete getDelete()
        Getter of Delete.
        Returns:
        Delete
      • getPatch

        public Patch getPatch()
        Getter of Patch.
        Returns:
        Patch
      • getActions

        public Action[] getActions()
        Getter of actions.
        Returns:
        Actions
      • getSubresources

        public SubResources getSubresources()
        Getter of sub-resources.
        Returns:
        Sub-resources
      • getPathParameter

        public Parameter getPathParameter()
        Get the path parameter.
        Returns:
        The path parameter.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • asResource

        public Resource asResource​(boolean mvccSupported,
                                   Schema resourceSchema,
                                   LocalizableString title,
                                   LocalizableString description)
        Builds a Resource from this Items instance.
        Parameters:
        mvccSupported - true when MVCC is supported and false otherwise
        resourceSchema - Resource-Schema or null
        title - The resource title.
        description - The resource description.
        Returns:
        New Resource
      • items

        public static Items.Builder items()
        Create a new Builder for Resoruce.
        Returns:
        Builder
      • fromAnnotatedType

        public static Items fromAnnotatedType​(Class<?> type,
                                              ApiDescription descriptor,
                                              SubResources subResources)
        Build an Items from an annotated request handler.
        Parameters:
        type - The annotated type.
        descriptor - The root descriptor to add definitions to.
        subResources - The sub resources.
        Returns:
        The built Items object.