Skip Headers
Oracle® Fusion Middleware Integration Guide for Oracle Enterprise Repository
11g Release 1 (11.1.1.7)

Part Number E15754-15
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

20 Custom Access Settings API

This chapter provides use cases for the Custom Access Settings API and describes how to retrieve the list of custom access settings types and retrieve the list of default custom access settings of a particular type in the Oracle Enterprise Repository.

This chapter includes the following sections:

20.1 Overview

The Custom Access Settings subsystem is used to provide a web services-based mechanism to retrieve Oracle Enterprise Repository Custom Access Settings (CAS). Example 20-1 describes a sample Custom Access Settings code.

Example 20-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();
    }
  }
}

20.2 Use Cases

This section describes the use cases using the Custom Access Settings API. It includes the following topics:

20.2.1 Use Case: Retrieve a List of Custom Access Setting Types

Description

This method is used to retrieve the list of Custom Access Settings Types as available in Oracle Enterprise Repository.

Sample Code

1. String[] lCustomAccessSettingNames = null;
2. lCustomAccessSettingNames = mFlashlineRegistry.customAccessSettingNamesGet
    (mAuthToken, "asset");

Annotations

Line 2 - Retrieve an array of Custom Access Setting Names of type "asset".

20.2.2 Use Case: Get Default Custom Access Setting Names

Description

This method is used to retrieve the list of Default Custom Access Settings of a particular type. An asset default Custom Access Setting is applied to all new assets, just as a file default Custom Access setting is applied to all new files, and so on.

Sample Code

1. String[] lCustomAccessSettingNames = null;
2. lCustomAccessSettingNames = mFlashlineRegistry.customAccessSettingDefault
     NamesGet(mAuthToken, "asset");

Annotations

Line 2 - Retrieve an array of default Custom Access Setting Names of type "asset".