Portlet Factory, Version 6.1.2
Container node flag
A container node flag supports the ability to query a profile set for its hierarchy without having to filter out thousands of leaf nodes. This flag is a boolean on each profile that can specify that it is a container. The hierarchy should be fairly limited in size compared to the number of leaf nodes, which in theory can number thousands or hundreds of thousands.
By default all new profiles created are containers and therefore manually set its container flag to false if you intend it to not be a container. This flag is also exposed as a profile property in the profile set manager.
To get/set the container flag through the API the following two methods have been added to the profile class.
/** * Gets if this Profile is a container, which specifies that this Profile may have child Profile nodes. * This is informational and is not enforced. It is used when retrieving Profile from the ProfileSetStorageManager, and also effects the Profile caching since containers are used when calculating profile values. * * @return true if this Profile is a container, else false. * * @see com.bowstreet.profiles.ProfileSetStorageManager#getChildProfiles(String, String, boolean) * */ public boolean isContainer() /** * Sets if this Profile is a container, which specifies that this Profile may have child Profile nodes. * This is informational and is not enforced. It is used when retrieving Profile from the ProfileSetStorageManager, and also effects the Profile caching since containers are used when calculating profile values. * * @param isContainer true if this Profile is a container, else false. * * @see com.bowstreet.profiles.ProfileSetStorageManager#getChildProfiles(String, String, boolean) * */ public void setIsContainer(boolean isContainer)Parent topic: Profiles
Library | Support |