6 Documentation Errata

This section describes documentation errata for Java API Reference for Oracle WebCenter Sites: Visitor Services.

6.1 Cache Tool Resources Missing from Java API Reference for Oracle WebCenter Sites: Visitor Services

Cache Tool Resources:

GET

http://<host>:<port>/<context>/rest/v1/cachetool/{region}/list

The resource endpoint can be used to fetch the list of all the providers currently installed in Visitor Services.

REQUEST:

Path Parameters: Name Description Format

Region: Accepts the values common and shared_cache. Common returns the list of all the installed providers, and Shared_cache returns the list of all the installed providers with the date of install/update String.

RESPONSE:

Supported Media Types: application/json

200 Response: The list of installed providers.

Example 6-1 Example 1: Fetch the list of currently installed providers

curl -i -H "Accept: application/json" -X GET
http://<host>:<port>/<context>/rest/v1/cachetool/common/list
Response:
Content-Length:1111
Content-Type:application/json

{
  "type": "cacheToolResponse",
  "status": "success",
  "entry": {
    "entry": [
{
        "key": "profileProviderConfig.pr1",
        "value": "profileProviderConfig.pr1"
      },
      {
        "key": "profileProviderConfig.pr2",
        "value": "profileProviderConfig.pr2"
      },
      {
        "key": "profileProvider.pr1",
        "value": "profileProvider.pr1"
      },
      {
        "key": "profileProvider.pr2",
        "value": "profileProvider.pr2"
      },
      {
        "key": "identityProviderConfig.identityProvider1",
        "value": "identityProviderConfig.identityProvider1"
      },
      {
        "key": "identityProvider.identityProvider1",
        "value": "identityProvider.identityProvider1"
      }
    ]
  }
}

Example 6-2 Example 2: Fetch the installed/updated time of currently installed providers

curl -i -H "Accept: application/json" -X GET
http://<host>:<port>/<context>/<rest>v1/cachetool/shared_cache/tool
Response:
 
Content-Type:application/json
 {
  "type": "cacheToolResponse",
  "status": "success",
  "entry": {
    "entry": [
      {
        "key": "profileProviderConfig.pr1",
        "value": "Fri Sep 04 12:03:41 IST 2015"
      },
      {
        "key": "profileProviderConfig.pr2",
        "value": "Fri Sep 04 12:03:41 IST 2015"
      },
      {
        "key": "profileProvider.pr1",
        "value": "Fri Sep 04 12:03:41 IST 2015"
      },
      {
        "key": "profileProvider.pr2",
        "value": "Fri Sep 04 12:03:41 IST 2015"
      },
      {
        "key": "identityProviderConfig.identityProvider1",
        "value": "Fri Sep 04 12:03:41 IST 2015"
      },
      {
        "key": "identityProvider.identityProvider1",
        "value": "Fri Sep 04 12:03:41 IST 2015"
      }
    ]
  }
}

6.2 Updated Parameter in the getAggregatedProfile API Methods

The public String getAggregatedProfile(String visitorId, String rule, boolean updated) and public String getAggregatedProfile(String visitorId, String rule) methods use the same REST point:

http://host:port/context/rest/v1/visitor/id/visitorId/profile/aggregated/rule

The method to use depends on the query parameter updated in the REST URL; for example, the URL http://host:port/context/rest/v1/visitor/id/visitorId/profile/aggregated/rule ?updated=true will use public String getAggregatedProfile(String visitorId,String rule, boolean updated). However, if you do not provide the query parameter updated, then the public String getAggregatedProfile(String visitorId, String rule) is called, which ultimately calls the first method with 3 parameters only, passing the value of the updated parameter as false. These two methods simplify the APIs for those who do not want to provide any value for the updated parameter so that they can call visitorClient.getAggregatedProfile(visitorId, rule) instead of having to specify the value false: visitorClient.getAggregatedProfile(visitorId, rule, false).

6.3 Visitor Services Sample Code

If the With Samples option is selected, the distribution includes the samples folder. The samples folder contains the source code and JAR for the default provider bundles available in WebCenter Sites. This sample code can be used for modifying the code in the default provider bundles, or it can be used as a starting tool for creating custom provider bundles.