org.openmdx.base.resource.cci.RestFunction Maven / Gradle / Ivy
/*
* ====================================================================
* Project: openMDX/Core, http://www.openmdx.org/
* Description: REST Functions
* Owner: OMEX AG, Switzerland, http://www.omex.ch
* ====================================================================
*
* This software is published under the BSD license as listed below.
*
* Copyright (c) 2009-2012, OMEX AG, Switzerland
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* * Neither the name of the openMDX team nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* ------------------
*
* This product includes software developed by other organizations as
* listed in the NOTICE file.
*/
package org.openmdx.base.resource.cci;
/**
* REST Functions
*
* The function either returns a record or updates a given output record
* - Return Record
* The execute()
method with a return record can be applied
* to interactions belonging to either remote or local connections.
* The return record
* - is
null
in case of {@link InteractionSpec#SYNC_SEND}
* - is an indexed record containing either
org:openmdx:kernel:Object
* records or operation results.
*
* - Output Record
* The execute()
method with an output record can be applied
* only to interactions belonging to local connections.
* The output record
*
* - is ignored in case of {@link InteractionSpec#SYNC_SEND},
* i.e. it can even be
null
* - must be an indexed record in case of {@link InteractionSpec#SYNC_SEND}
* which is modified by add()
operations for either
* org:openmdx:kernel:Object
records or operation results.
*
* - Object Holder
* Each org:openmdx:kernel:Object
holder has the following structure:
* path
, a path representing the object's resource identifier (an XRI)
* version
, the object's version (an opaque byte[])
* lock
, the object's lock (an opaque byte[])
* value
, some or all of the object's features (a mapped record)
*
*
*/
public enum RestFunction {
/**
* Object retrieval or verification
*
* The input record represents either a query, a retrieval, a refresh or a
* verification request:
* - An
org:openmdx:kernel:Query
input record identifies a query request.
* queryType
, the candidate class' MOF identifier (a string value)
* query
, filter and ordering (a {@link Queries#OPENMDXQL} string value)
* position
, the lower bound (a number value)
* size
, the maximal number of elements to be returned (a number value)
* parameters
, the parameters (an indexed or mapped record)
* refresh
, a flag telling whether the client asks for the object to be refreshed
*
* - An indexed input record identifies an object retrieval request.
* - The objects are identified by Path instances representing their XRIs.
*
* - An
org:openmdx:kernel:Object
input record identifies a
* verification request.
* path
, the object's resource identifier (a Path)
* version
, the object's version to be verified.
* lock
, the object's lock to be verified.
*
*/
GET,
/**
* Object modification
*
* The input record represents either a touch or an update request:
* - An
org:openmdx:kernel:Query
input record identifies a
* touch by query request.
* queryType
, the candidate class' MOF identifier (a string value)
* query
, filter and ordering (a {@link Queries#OPENMDXQL} string value)
* position
, the lower bound (a number value)
* size
, the maximal number of elements to be returned (a number value)
* parameters
, the parameters (an indexed or mapped record)
*
* - An indexed input record identifies a touch request.
* - The objects are identified by Path instances representing their XRIs.
*
* - An
org:openmdx:kernel:Object
input record identifies
* an update request.
* path
, a path representing the object's resource identifier (an XRI)
* version
, the object's version to be verified.
* lock
, the object's lock to be verified.
*
*/
PUT,
/**
* Object removal
*
* The input record represents either a delete by query request, a forced delete
* request or a verified delete request:
* - An
org:openmdx:kernel:Query
input record identifies a query.
* queryType
, the candidate class' MOF identifier (a string value)
* query
, filter and ordering (a {@link Queries#OPENMDXQL} string value)
* position
, the lower bound (a number value)
* size
, the maximal number of elements to be returned (a number value)
* parameters
, the parameters (an indexed or mapped record)
*
* - An indexed input record identifies a forced delete request.
* - The objects are identified by Path instances representing their XRIs.
*
* - An
org:openmdx:kernel:Object
input record identifies a
* verifiedU delete request.
* path
, a path representing the object's resource identifier (an XRI)
* version
, the object's version to be verified.
* lock
, the object's lock to be verified.
*
*/
DELETE,
/**
* Object creation or method invocation
*
* The input is a mapped record
* - Object Creation
* - the key is a Path representing the object's resource identifier (an XRI)
*
- the value is a mapped record for the object's values
*
- the return or output record member is the corresponding object holder
*
* - Method Invocation
* - the key is a Path representing the method's invocation XRI
*
- the value record contains the method invocation arguments
*
- the return or output record member is the method invocation result
*
*
*/
POST;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy