Security Administration (ISecurityAdmin Interface) |
Creates a transaction context for an authorization request.
Category: Transaction context methods
Syntax |
BeginTransactionContext(resource,flags,tCtxt);
Parameters |
Details |
The BeginTransactionContext method gets a transaction context for the metadata object specified in RESOURCE. A handle to the new transaction context is returned in the output TCTXT parameter. Use this handle to identify the pertinent transaction context in general authorization administration methods and ACT administration methods.
If the target resource is not immediately known, submit the method with an empty string in the RESOURCE parameter. You can identify the target resource for the authorization changes in the EndTransactionContext method.
Exceptions Thrown |
The SAS Open Metadata Interface explicitly returns the following exceptions for the BeginTransactionContext method:
SECAD_INVALID_RESOURCE_SPEC
SECAD_NOT_AUTHORIZED
Examples |
The following code fragment shows how the BeginTransactionContext method is issued in a Java environment:
public void beginTransactionContext (String obj,StringHolder tCtxt) throws Exception { try { iSecurityAdmin.BeginTransactionContext (obj, 0, tCtxt); } catch (Exception e) { System.out.println("BeginTransactionContext: Exceptions"); e.printStackTrace(); throw e; } }
The following example issues the BeginTransactionContext method to begin a transaction context on a preexisting Tree object defined by the object variable Tree_URN:
// Define a holder for the transaction context StringHolder tCtxt = new StringHolder(); // Begin a transaction context on the Tree object. iSecurityAdmin.BeginTransactionContext(Tree_URN, tCtxt);
Related Methods |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.