RESTController.php
104 if ($request->hasValue('sourceOid') && $request->hasValue('relation') && $request->hasValue('targetId')) {
166 * | _in_ `query` | A query condition encoded in RQL to be used with StringQuery::setRQLConditionString()
181 * | _in_ `sourceId` | Id of the object to which the returned objects are related (determines the object id together with _className_)
183 * | _in_ `relation` | Name of the relation to the object defined by _sourceId_ (determines the type of the returned objects)
187 * | _in_ `query` | A query condition encoded in RQL to be used with StringQuery::setRQLConditionString()
260 * | _in_ `sourceId` | Id of the object to which the created objects are added (determines the object id together with _className_)
261 * | _in_ `relation` | Name of the relation to the object defined by _sourceId_ (determines the type of the created/added object)
360 * | _in_ `relation` | Relation name if an existing object should be added to a relation (determines the type of the added object)
361 * | _in_ `sourceId` | Id of the object to which the added object is related (determines the object id together with _className_)
362 * | _in_ `targetId` | Id of the object to be added to the relation (determines the object id together with _relation_)
440 * | _in_ `relation` | Name of the relation to the object defined by _sourceId_ (determines the type of the deleted object)
441 * | _in_ `sourceId` | Id of the object to which the deleted object is related (determines the object id together with _className_)
Session is the interface for session implementations and defines access to session variables.
Definition: Session.php:19
Response holds the response values that are used as output from Controller instances.
Definition: Response.php:20
Request holds the request values that are used as input to Controller instances.
Definition: Request.php:18
executeSubAction($action)
Delegate the current request to another action.
Definition: Controller.php:211
EventManager is responsible for dispatching events to registered listeners.
Definition: EventManager.php:21
setLocationHeaderFromOid($oidStr)
Set the location response header according to the given object id.
Definition: RESTController.php:528
__construct(Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration, EventManager $eventManager)
Constructor.
Definition: RESTController.php:67
createInRelation()
Create an object of a given type in the given relation.
Definition: RESTController.php:267
const AFTER_COMMIT
An AFTER_COMMIT event occurs after the transaction is committed.
Definition: TransactionEvent.php:35
TransactionEvent instances are fired at different phases of a transaction.
Definition: TransactionEvent.php:23
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
requireTransaction()
Start or join a transaction that will be committed at the end of execution.
Definition: Controller.php:334
Implementations of Configuration give access to the application configuration.
Definition: Configuration.php:32
updateInRelation()
Update an object in a relation or change the order.
Definition: RESTController.php:367
ApplicationError is used to signal errors that occur while processing a request.
Definition: ApplicationError.php:41
static parse($oid)
Parse a serialized object id string into an ObjectId instance.
Definition: ObjectId.php:135
static get($code, $data=null)
Factory method for retrieving a predefined error instance.
Definition: ApplicationError.php:144
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23
getValue($name, $default=null, $validateDesc=null, $suppressException=false)
Get a value.
initialize(Request $request, Response $response)
Definition: RESTController.php:92
getRelatedType(ObjectId $sourceOid, $role)
Get the type that is used in the given role related to the given source object.
Definition: RESTController.php:557
RESTController handles requests sent from a dstore/Rest client.
Definition: RESTController.php:51
Controller is the base class of all controllers.
Definition: Controller.php:49
static getRelationQueryCondition($node, $otherRole)
Get the query condition used to select all related Nodes of a given role.
Definition: NodeUtil.php:117
ActionMapper implementations are responsible for instantiating and executing Controllers based on the...
Definition: ActionMapper.php:21
addListener($eventName, $callback)
Register a listener for a given event.
static isValid($oid)
Check if a serialized ObjectId has a valid syntax, the type is known and if the number of primary key...
Definition: ObjectId.php:123
PermissionManager implementations are used to handle all authorization requests.
Definition: PermissionManager.php:20
handleSubResponse(Response $subResponse, $oidStr=null)
Create the actual response from the response resulting from delegating to another controller.
Definition: RESTController.php:468
Localization defines the interface for storing localized entity instances and retrieving them back.
Definition: Localization.php:32
Message is used to get localized messages to be used in the user interface.
Definition: Message.php:23