Beispiel #1
0
 private static NCube prepareCube(NCube cube) {
   applyAdvices(cube.getApplicationID(), cube);
   String cubeName = cube.getName().toLowerCase();
   if (!cube.getMetaProperties().containsKey("cache")
       || Boolean.TRUE.equals(
           cube.getMetaProperty(
               "cache"))) { // Allow cubes to not be cached by specified 'cache':false as a cube
                            // meta-property.
     getCacheForApp(cube.getApplicationID()).put(cubeName, cube);
   }
   return cube;
 }
Beispiel #2
0
  /**
   * Add a cube to the internal cache of available cubes.
   *
   * @param ncube NCube to add to the list.
   */
  public static void addCube(ApplicationID appId, NCube ncube) {
    validateAppId(appId);
    validateCube(ncube);

    String cubeName = ncube.getName().toLowerCase();

    if (!ncube.getMetaProperties().containsKey("cache")
        || Boolean.TRUE.equals(
            ncube.getMetaProperty(
                "cache"))) { // Allow cubes to not be cached by specified 'cache':false as a cube
                             // meta-property.
      getCacheForApp(appId).put(cubeName, ncube);
    }

    // Apply any matching advices to it
    applyAdvices(appId, ncube);
  }