Oracle® Fusion Middleware Integration Guide for Oracle Enterprise Repository 11g Release 1(11.1.1) Part Number E15754-01 |
|
|
View PDF |
This chapter provides an overview of Custome Access Settings API and describes the use cases using this API.
This chapter contains the following sections:
The Custom Access Settings Subsystem is used to provide a Web Services-based mechanism to retrieve Oracle Enterprise Repository Custom Access Settings (CAS). Example 16-1 describes a sample Custom Access Settings code.
Example 16-1 Example of Custom Access Settings Code
Working code for Custom Access Settings Open API methods.
package com.flashline.sample.customaccesssettingsapi; import java.net.MalformedURLException; import java.net.URL; import java.rmi.RemoteException; import javax.xml.rpc.ServiceException; import com.flashline.registry.openapi.base.OpenAPIException; import com.flashline.registry.openapi.entity.AuthToken; import com.flashline.registry.openapi.service.v300.FlashlineRegistry; import com.flashline.registry.openapi.service.v300.FlashlineRegistryServiceLocator; public class CustomAccesssettings { public static void main(String pArgs[]) throws java.rmi.RemoteException, OpenAPIException { try { /////////////////////////////////////////////////////////// // Connect to Oracle Enterprise Repository /////////////////////////////////////////////////////////// URL lURL = null; lURL = new URL(pArgs[0]); FlashlineRegistry repository = new FlashlineRegistryServiceLocator() .getFlashlineRegistry(lURL); // ////////////////////////////// // Authenticate with OER // ////////////////////////////// AuthToken authToken = repository.authTokenCreate( pArgs[1],pArgs[2]); // //////////////////////////////////////////////////////////// // Retrieve a List of Custom Access Setting Types // //////////////////////////////////////////////////////////// String[] lRoleContextTypes = null; lRoleContextTypes = repository .customAccessSettingTypesGet(authToken); // //////////////////////////////////////////////////////////// // Get Custom Access Setting Names // //////////////////////////////////////////////////////////// String[] lCustomAccessSettingNames = null; lCustomAccessSettingNames = repository .customAccessSettingNamesGet(authToken, "asset"); // //////////////////////////////////////////////////////////// // Retrieve an array of Custom Access Setting Names of type "asset". // //////////////////////////////////////////////////////////// String[] rCustomAccessSettingNames = null; rCustomAccessSettingNames = repository .customAccessSettingDefaultNamesGet(authToken, "asset"); } catch (OpenAPIException lEx) { System.out.println("ServerCode = " + lEx.getServerErrorCode()); System.out.println("Message = " + lEx.getMessage()); System.out.println("StackTrace:"); lEx.printStackTrace(); } catch (RemoteException lEx) { lEx.printStackTrace(); } catch (ServiceException lEx) { lEx.printStackTrace(); } catch (MalformedURLException lEx) { lEx.printStackTrace(); } } }
This section describes the use cases using the Custom Access Settings API. It contains the following topics:
Section 16.2.1, "Use Case: Retrieve a List of Custom Access Setting Types"
Section 16.2.2, "Use Case: Get Default Custom Access Setting Names"
Description
This method is used to retrieve the list of Custom Access Settings Types as available in Oracle Enterprise Repository.
Sample code is as follows:
1. String[] lCustomAccessSettingNames = null; 2. lCustomAccessSettingNames = mFlashlineRegistry.customAccessSettingNamesGet(mAuthToken, "asset");
Annotations
Line 2 - Retrieve an array of Custom Access Setting Names of type "asset".
Description
This method is used to retrieve the list of Default Custom Access Settings of a particular type. An asset default Custom Access Setting will be applied to all new assets, just as a file default Custom Access setting will be applied to all new files, and so on.
Sample code is as follows:
1. String[] lCustomAccessSettingNames = null; 2. lCustomAccessSettingNames = mFlashlineRegistry.customAccessSettingDefaultNamesGet(mAuthToken, "asset");
Annotations
Line 2 - Retrieve an array of default Custom Access Setting Names of type "asset".