PhenixID

PSD1057 – themes.properties

Fact

This PSD is written for PhenixID Identity Manager (PIM) 5.6.0

Overview

This PSD explains how icon selection is done when doing searches (predefined search, browse or in a custom control) depending on the values of object attributes.

How does it work?

When doing a search with IM and a result is to be displayed, IM will decide what icon to choose by the following criteria:

  1. Check icon cache
    IM will check the icon cache for the user session first. When objects are displayed they will be cached in back-end for the user session in 60 seconds.
    More information about icon cache can be found further down in this document.
  2. Check theme.properties
    If the object to be displayed is not in icon cache, IM will check the theme.properties file for what icon to select.
    More information about icon cache can be further down in this document.

Icon cache

User session and icon cache

An example to explain how it works.

  1. Administrator A will change an object from enabled to disabled. The object will be displayed with icon1, since it’s still enabled.
  2. After the change it should be displayed with icon 2, representing a disabled object. But since it is cached it will still display icon 1 for another 60 sec.
  3. Administrator A can either wait for 60 seconds, or logout and login again, to get the new icon for the object.
  4. If another administrator logs in during this 60 seconds interval, it will se icon 2, since it has it own user session.

Policy THEME_CACHE_LIFETIME

If you like to change the value of the 60 seconds, you can add the following policy:

THEME_CACHE_LIFETIME= (value in seconds)

themes.properties

The themes.properties file is located in the \..\PhenixID\IM\customer\theme\PhenixID folder.

  1. If IM has one object and tries to decide what icon to use it will check the themes.properties file.
  2. It starts from the top of the file and work its way down. The first match it will find, that’s the icon it will use. So the order of the icon selection in the list is important.

For example, if a user have all the below values in carLicense, the blue-user icon will be selected since that’s the first match.
Theme.properties example:
(carLicense\=blue)=blue-user.png
(carLicense\=grey)=grey-user.png
(carLicense\=red)=red-user.png

Icon image folder, add custom icons

There are two folders that IM will check for icons to use.

  1. \\..\IM\application\editor\themes\PhenixID
    This is where all the icons are located that are included in PIM by default. If you upgrade PIM to a newer version this folder will be overwritten.
  2. \\..\IM\customer\extension\web\editor\themes\PhenixID
    This is where you can store your own icons. This folder will not be overwritten when you do an upgrade.
    Note: the folder structure \editor\themes\PhenixID under \web does not exist by default, you need to create this structure if you like to add your own icons.

Disable initial icon cache

If have an LDAP directory with a lot of objects (+100.000), when selecting a role after login in 5.6.0 you may notice that it takes some time before the MAIN view loads. This is because an icon cache is created to make searches in MAIN faster. This was introduced in PIM 5.6.0. With PIM 5.6.5 there is a policy to enable the pre 5.6.0 way to manage icons in PIM.
Best practice is to have it the new way, no need to set the policy.
In large LDAP directories, set the policy and then make sure that searches in MAIN does not result in large result set if possible.
The new policy is:
USE_ICON_CACHE=false/true (if no policy is set then value is default true.)
Note, this policy is available in PIM 5.6.5 and later.


DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID - support.phenixid.se