The filter map supports the concept of defaults at each object level. When CCStoreConfiguration cannot find a match for a piece of data in the context object, it looks for a default. If it finds a default, it searches within that default object’s children for the next piece of data in the priority list. If it cannot find a match or a default, it will not return a response filter key.

The concept of default objects can exist at any level in a filter map. For example, consider this filter map that sets its priority list to ["endpoint","page","identifier","viewport"]:

var newFilterMap = {
          "endpoint1": {
              "page1":{"cc-filter-config-key": "key1"},
              "page2":{"cc-filter-config-key": "key2"},
              "page3":{
                  "identifier1":{"cc-filter-config-key": "key3"},
                  "identifier2":{"cc-filter-config-key": "key4"},
                  "cc-filter-config-key": "key11",
                  "default":{
                      "viewport1":{"cc-filter-config-key": "key5"},
                      "viewport2":{"cc-filter-config-key": "key6"},
                      "default":{"cc-filter-config-key": "key7"}
                      }
                  },
              "cc-filter-config-key": "key8",
              "default":{
                  "identifier1":{"cc-filter-config-key": "key9"},
                  "default":{"cc-filter-config-key": "key10"}
              }
          }
        };

The following table lists a variety of sample context objects and the response filter key that would be returned for them based on this filter map:

Context Object Data

Filter Key Returned

endpoint1

key8

endpoint1, page1

key1

endpoint1, page3

key11

endpoint1, page3, identifier1

key3

endpoint1, page3, identifier2

key4

endpoint1, page1, identifier3

key1

endpoint1, page3, identifier3, viewport1

key5

endpoint1, page3, identifier3, viewport3

key7

endpoint1, page4

null

endpoint1, page4, identifier1

key9

endpoint1, page4, identifier2

key10

endpoint1, page1, identifier1

key1


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices