Execution Permissions
The methods listed on this page allow ACL operations for the execution entity.
Note: The following imports are required for all of the Java code examples on this page.
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import com.pervasive.datacloud2.schema.api.acl.v1.ACLService;
import com.pervasive.datacloud2.schema.api.acl.v1.ACLServicePortBindingStub;
import com.pervasive.datacloud2.schema.api.acl.v1.ACLServiceService;
import com.pervasive.datacloud2.schema.api.acl.v1.ACLServiceServiceLocator;
import com.pervasive.datacloud2.schema.api.acl.v1.InvalidSessionException;
import com.pervasive.datacloud2.schema.api.acl.v1.Action;
Tip... Use the Entity API Service
login method to start a session and obtain the sessionId parameter required for the ACL Service API methods. See
Login and Logout.
setExecutionPermission
Set access permission to an execution entity for a specific user.
Parameters
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://datacloud2.pervasive.com/schema/api/acl/v1/">
<soapenv:Header/>
<soapenv:Body>
<v1:setExecutionPermission>
<id>3dc247c2-1abb-47be-a698-788bf37339e5</id>
<user>171</user>
<permission>READ</permission>
<sessionId>b71cf2d8-a5e8-4563-89a7-4bacdcc9c72f</sessionId>
</v1:setExecutionPermission>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:setExecutionPermissionResponse xmlns:ns2="http://datacloud2.pervasive.com/schema/api/acl/v1/" xmlns:ns3="http://datasolutions.pervasive.com/api/crud"/>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e5";
final long user = 171;
final String permission = "READ";
final String sessionId = "70c84502-e6d2-4c4b-b3a9-a74c6f8a5ff9";
ACLServiceServiceLocator service = new ACLServiceServiceLocator();
ACLService stub = service.getACLServicePort();
stub.setExecutionPermission(id, user, permission, sessionId);
getExecutionACL
List the access permissions attached to a specified execution entity.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://datacloud2.pervasive.com/schema/api/acl/v1/">
<soapenv:Header/>
<soapenv:Body>
<v1:getExecutionACL>
<id>3dc247c2-1abb-47be-a698-788bf37339e5</id>
<sessionId>b71cf2d8-a5e8-4563-89a7-4bacdcc9c72f</sessionId>
</v1:getExecutionACL>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getExecutionACLResponse xmlns:ns2="http://datacloud2.pervasive.com/schema/api/acl/v1/" xmlns:ns3="http://datasolutions.pervasive.com/api/crud">
<return>
<ns2:entry user="171">
<ns2:permission>READ</ns2:permission>
</ns2:entry>
<ns2:entry user="335">
<ns2:permission>READ</ns2:permission>
<ns2:permission>WRITE</ns2:permission>
<ns2:permission>EXECUTE</ns2:permission>
<ns2:permission>GRANT</ns2:permission>
</ns2:entry>
<ns2:entry user="995">
<ns2:permission>READ</ns2:permission>
</ns2:entry>
</return>
</ns2:getExecutionACLResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e5";
final String sessionId = "70c84502-e6d2-4c4b-b3a9-a74c6f8a5ff9";
ACLServiceServiceLocator service = new ACLServiceServiceLocator();
ACLService stub = service.getACLServicePort();
String executionValue[][] = stub.getExecutionACL(id, sessionId);
hasAccessToExecution
Check whether a specified execution entity has the designated permissions.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://datacloud2.pervasive.com/schema/api/acl/v1/">
<soapenv:Header/>
<soapenv:Body>
<v1:hasAccessToExecution>
<verb>READ</verb>
<executionId>3dc247c2-1abb-47be-a698-788bf37339e5</executionId>
<sessionId>b71cf2d8-a5e8-4563-89a7-4bacdcc9c72f</sessionId>
</v1:hasAccessToExecution>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:hasAccessToExecutionResponse xmlns:ns2="http://datacloud2.pervasive.com/schema/api/acl/v1/" xmlns:ns3="http://datasolutions.pervasive.com/api/crud">
<return>true</return>
</ns2:hasAccessToExecutionResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String verb = "READ";
final String id = "3dc247c2-1abb-47be-a698-788bf37339e5";
final String sessionId = "70c84502-e6d2-4c4b-b3a9-a74c6f8a5ff9";
ACLServiceServiceLocator service = new ACLServiceServiceLocator();
ACLService stub = service.getACLServicePort();
Boolean executionAccess = stub.hasAccessToExecution(Action.fromString(verb), id, sessionId);
clearExecutionPermission
Clear the access permission to an execution entity for a specified user.
Parameters
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://datacloud2.pervasive.com/schema/api/acl/v1/">
<soapenv:Header/>
<soapenv:Body>
<v1:clearExecutionPermission>
<id>3dc247c2-1abb-47be-a698-788bf37339e5</id>
<user>171</user>
<permission>READ</permission>
<sessionId>b71cf2d8-a5e8-4563-89a7-4bacdcc9c72f</sessionId>
</v1:clearExecutionPermission>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:clearExecutionPermissionResponse xmlns:ns2="http://datacloud2.pervasive.com/schema/api/acl/v1/" xmlns:ns3="http://datasolutions.pervasive.com/api/crud"/>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e5";
final long user = 171;
final String permission = "READ";
final String sessionId = "70c84502-e6d2-4c4b-b3a9-a74c6f8a5ff9";
ACLServiceServiceLocator service = new ACLServiceServiceLocator();
ACLService stub = service.getACLServicePort();
stub.clearExecutionPermission(id, user, permission, sessionId);
Last modified date: 12/17/2021