The following code fragment
shows how the CreateAccessControlTemplate method is issued in a Java
environment:
public void createAccessControlTemplate(String transCtxt, String repository,
String[][] ACTattributes ) throws Exception {
try
{
iSecurityAdmin.CreateAccessControlTemplate(transCtxt, repository, ACTattributes);
}
catch (Exception e) {
System.out.println("CreateAccessControlTemplate: Exceptions");
e.printStackTrace();
throw e;
}
}
The following example
issues the CreateAccessControlTemplate method to create an ACT in
the repository defined in REPOSRESOURCE:
public void createAccessControlTemplate() throws Exception {
// Name and Desc values for ACT
final String[][] ActAttribs =
{
{"NAME", testUserACTname},
{"DESC", "ACT to project testUser's resources"}
};
// Repository in which the ACT will be created
StringHolder REPOSresource = new StringHolder(REPOSID:_reposid);
try {
iSecurityAdmin. createAccessControlTemplate("", REPOSresource.value,
ActAttribs);
}
catch (Exception e ){
throw e;
}
}