Package io.inversion

Class Op

  • All Implemented Interfaces:
    java.lang.Comparable<Op>

    public final class Op
    extends java.lang.Object
    implements java.lang.Comparable<Op>
    • Constructor Detail

      • Op

        public Op()
    • Method Detail

      • matches

        public boolean matches​(Request req,
                               io.inversion.utils.Path path)
      • getOperationPath

        public java.lang.String getOperationPath()
      • isInternal

        public boolean isInternal()
        Indicates this operation should not be called from clients directly but may be used for internal calls.
        Returns:
        true if internal is true or either endpoint.isInternal() or collection.isInternal() are true
      • withInternal

        public Op withInternal​(boolean internal)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getActionPathMatch

        public io.inversion.utils.Path getActionPathMatch()
      • withActionPathMatch

        public Op withActionPathMatch​(io.inversion.utils.Path actionPathMatch)
      • withActionMatch

        public Op withActionMatch​(Action action,
                                  io.inversion.utils.Path actionMatchPath,
                                  java.lang.Boolean isEpAction)
      • getActions

        public java.util.List<Action> getActions()
      • hasParams

        public boolean hasParams​(Param.In in,
                                 java.lang.String... keys)
      • getPathParamValue

        public java.lang.String getPathParamValue​(java.lang.String key)
      • withParam

        public Op withParam​(Param param)
      • getParams

        public java.util.List<Param> getParams()
      • removeParam

        public void removeParam​(Param param)
      • getPathParams

        public java.util.List<Param> getPathParams​(int pathIndex)
      • getParam

        public Param getParam​(Param.In in,
                              java.lang.String key)
      • getPathParamCount

        public int getPathParamCount()
      • compareTo

        public int compareTo​(Op o)
        Specified by:
        compareTo in interface java.lang.Comparable<Op>
      • functionAsInt

        public static int functionAsInt​(Op.OpFunction func)
      • getName

        public java.lang.String getName()
      • withName

        public Op withName​(java.lang.String name)
      • getMethod

        public java.lang.String getMethod()
      • withMethod

        public Op withMethod​(java.lang.String method)
      • getPath

        public io.inversion.utils.Path getPath()
      • withPath

        public Op withPath​(io.inversion.utils.Path path)
      • getEndpointPathMatch

        public io.inversion.utils.Path getEndpointPathMatch()
      • withEndpointPathMatch

        public Op withEndpointPathMatch​(io.inversion.utils.Path endpointPathMatch)
      • getEndpoint

        public Endpoint getEndpoint()
      • withEndpoint

        public Op withEndpoint​(Endpoint endpoint)
      • getCollection

        public Collection getCollection()
      • withCollection

        public Op withCollection​(Collection collection)
      • withRelationship

        public Op withRelationship​(Relationship relationship)
      • getApi

        public Api getApi()
      • withApi

        public Op withApi​(Api api)
      • getDbPathMatch

        public io.inversion.utils.Path getDbPathMatch()
      • withDbMatchPath

        public Op withDbMatchPath​(io.inversion.utils.Path dbMatchPath)
      • getDb

        public Db getDb()
      • withDb

        public Op withDb​(Db db)
      • getEngine

        public Engine getEngine()
      • withEngine

        public Op withEngine​(Engine engine)
      • withDbPathMatch

        public Op withDbPathMatch​(io.inversion.utils.Path dbPathMatch)
      • getCollectionPathMatch

        public io.inversion.utils.Path getCollectionPathMatch()
      • withCollectionPathMatch

        public Op withCollectionPathMatch​(io.inversion.utils.Path collectionPathMatch)
      • getDescription

        public java.lang.String getDescription()
      • withDescription

        public Op withDescription​(java.lang.String description)
      • getActionPathMatches

        public java.util.List<org.apache.commons.lang3.tuple.Triple<Action,​io.inversion.utils.Path,​java.lang.Boolean>> getActionPathMatches()
      • isEpAction

        public boolean isEpAction​(Action action)