Through MagNews AppCloud Scripting API it is possible to implement custom web services operations.
A MagNews Application must extend classscripting.apps.WebServiceOperationExecutor in order to define custom operations.
public class MyExtension extends scripting.apps.WebServiceOperationExecutor {
public CustomOperationResult executeOperation(AuthenticationInfo auth, String operationName, CustomOperationParameters parameters, ClientInfo clientInfo, Context mnapi) throws Exception {
CustomOperationResult result = new CustomOperationResult();
Manager manager = mnapi.getManager();
// do whatever you what.....
return result;
}
}
Custom application code will be executed calling this operation
callApplication
It executes a declared operation in a MagNews App
| Parameter | Type |
|---|---|
| authInfo | AuthInfo |
| clientInfo | ClientInfo |
| appId | String |
| operationname | String |
| parameters | ApplicationParameters |
Return values: ApplicationResult