The attribute descriptor file (attr-descriptor.xml) is used to define and customize extended properties (or attributes). It can be associated with each page, portlet, or URL in the navigation hierarchy.
The attribute descriptor file is on the Portal Server as follows: wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/shared/app/config/attr-descriptor.xml
The attr-descriptor.xml contains a hierarchy of attributes and groups. All attributes and groups are contained by the top-level group named ea. The ea group contains subgroups for attributes and rules named attr and rule.
The hierarchy of groups uniquely identifies each attribute. The parent groups of each attribute are used to create a dot-delimited path that defines the unique attribute. The following tables list some of the default attributes and rules included with Mobile Portal Accelerator. Unique attribute values can be assigned, modified, or deleted using the Extended Properties portlet for each page, portlet, or URL in the navigation hierarchy.
<Attribute-Group name="ea">
<Attribute-Group name="attr">
<Attribute-Group name="default">
<!-- default attributes -->
</Attribute-Group>
</Attribute-Group>
</Attribute-Group>
Attribute/Group Name | Type | Description |
---|---|---|
ea.attr | group | This attribute group contains all attributes configurable using the Extended Properties portlet. |
ea.attr.default | group | This attribute group contains all of the default Mobile Portal Accelerator attributes. |
iconResource | string | Defines the icon resource asset (as found in
the MCS repository) to use when displaying an icon for a page, portlet,
or URL. Icons for specific navigation views can be defined by adding <Attribute>
elements within the iconResource attribute with the specific view
name (pda, icon, or tree). For example, you could have: ea.attr.default.iconResource.pda The ea.attr.default.iconResource is both the fallback icon as well as the icon for the navigation view specified by the mwp.viewmode.default property in mwp.properties. If mwp.viewmode.default=tree, then devices configured for the tree navigation view use the ea.attr.default.iconResource. Devices configured for the pda navigation view use the icon defined in ea.attr.default.iconResource.pda; otherwise, it uses ea.attr.default.iconResource as a fallback. Note: If both iconResource and iconURL are specified,
iconResource takes precedence.
|
iconURL | string | Instead of specifying the iconResource, the
source URL can be specified for the icon. The URL can be relative
or fully qualified starting with http://. The handling of different
navigation views is also similar to iconResource. For example, you
could have: ea.attr.default.iconURL.pda The ea.attr.default.iconURL is both the fallback icon as well as the icon for the navigation view specified by the mwp.viewmode.default property in mwp.properties. If mwp.viewmode.default=tree, then devices configured for the tree navigation view use the ea.attr.default.iconURL. Devices configured for the pda navigation view use the icon defined in ea.attr.default.iconURL.pda; otherwise, it uses ea.attr.default.iconURL as a fallback. Note: If both iconResource and iconURL are specified,
iconResource takes precedence.
|
navtitle | string | If any normal mode portlet content is rendered on a page, the navtitle is shown before the navigation links to mark the beginning of the navigation. |
altTitle.default | string | Defines the default short title displayed for a page, portlet, or URL. This is the fallback short title when there is no locale-specific short title is available. |
altTitle.<language>_<country>_<variant> | string | Locale-specific short titles are defined by
adding a locale-specific <Attribute> element to the ea.attr.default.altTitle <Attribute-Group>
element. For example, if you want to specify a short title in Traditional
Chinese (zh_TW), you would specify the attribute using the following
pattern, ea.attr.default.altTitle.<language>_<country>_<variant>
or ea.attr.default.altTitle.zh_TW. The aggregator looks
for the most specific short title first using the specific locale
of the requesting device. For example, the aggregator checks for
the following localized titles working from most specific to least
specific.
|
Rule attributes define the rules which determine whether a client can see a page, portlet, or URL in the navigation hierarchy. When a client requests a page, the aggregator compares the rule settings for each page, portlet, and URL to the characteristics of the requesting device to determine which items are displayed and which items are not appropriate for the device.
<Attribute-Group name="ea">
<Attribute-Group name="rule">
<Attribute-Group name="default">
<!-- default rules -->
</Attribute-Group>
</Attribute-Group>
</Attribute-Group>
The following table describes the default rule group and rules.
Rule/Group Name | Type | Description |
---|---|---|
ea.rule | group | Group containing all rule-based attributes. A <Rule-Info> element is specified which defines the default rule generator class that can generically handle most child <Attribute> elements within this group. The child <Attribute> elements can override this class if a more specific class is needed to handle more complex rule logic. |
ea.rule.default | group | This group contains all the default Mobile Portal Accelerator rules. |
vendor | enumeration | Determines whether the requesting device must match a particular vendor or manufacturer. You can specify any number of vendors, but the device needs to match just one of the vendors. Value options are specified to indicate the available vendors from which the administrator can select. |
model | enumeration | Determines whether the requesting device must
match a particular model or manufacturer. You can specify any number
of vendors, but the device needs to match just one of the models.
Value options are specified to indicate the available models from
which the administrator can select. The value options must be of the
format <mfg>-<modelnum>. You can find both mfg and modelnum
by using the Mobile Portal Toolkit to
browse the particular device policies. Note: The dash between the <mfg> and <modelnum> must
be included for this rule to work properly.
|
deviceClass | enumeration | Determines whether the requesting device must belong to a particular device class. Only pda and phone classes are provided by default. |
imageCapable | boolean | Determines whether the requesting device must be image capable. |
colorCapable | boolean | Determines whether the requesting device must be color capable. The <Rule-Info> element specified here overrides the default Java™ class defined in ea.rule. A new Java class is specified because the color capable rule requires more complex logic to resolve whether the device is color capable or not. |
soundOutputCapable | boolean | Determines whether the requesting device must be able to play audio. |
<Attribute-Group name="ea">
<Attribute-Group name="attr">
<Attribute-Group name="preloadNotice">
<!-- default Preload Notice attributes -->
</Attribute-Group>
</Attribute-Group>
</Attribute-Group>
The following table describes the default preload notice attributes.
Attribute/Group Name | Type | Description |
---|---|---|
ea.attr.preloadNotice | group | Group containing all attributes pertaining to defining a preload notice. The Preload Notice Portlet uses the following attributes to store information about a preload notice. |
name | string | Required string which identifies the JSP fragment used to display the preload notice. |
id | string | Required to uniquely identify the preload notice. This is internally generated by Mobile Portal Accelerator and is not displayed to the administrator. |
title | string | Optional title that a JSP fragment can display for the preload notice. The JSP fragment can honor this value. |
description | string | Optional string, which is used only to describe the preload notice or to add comments about the preload notice. |
type | int | Required integer that indicates the type of
preload notice: 0 – Custom |
actionURL | string | Optional action URL to use for configuring a preload notice button. For the advertisement preload notice, this configures the YES button. |
allowDoNotPrompt | boolean | Optional Boolean that indicates whether a check box is displayed to an authenticated user to allow them to force the preload notice to not prompt again. |
timeout | int | Optional redirect timeout value specified in seconds. If the JSP fragment uses this value, it must provide the redirect URL when the page timeout is exceeded. |
After the preload notice attributes are defined, rules can be configured to determine when the preload notice is displayed. The following fragment from the attribute descriptor file shows the groups that contain the preload notice rules.
<Attribute-Group name="ea">
<Attribute-Group name="rule">
<Attribute-Group name="preloadNotice">
<Attribute-Group name="default">
<!-- default Preload Notice rules -->
</Attribute-Group>
</Attribute-Group>
</Attribute-Group>
</Attribute-Group>
Rule/Group Name | Type | Description |
---|---|---|
ea.rule.preloadNotice.default | group | Group containing all attributes used in resolving when preload notices are displayed. These groups are not time related except for the dateRange. |
enable | boolean | Optional Boolean to enable or disable the preload notice without deleting the defined preload notice. |
dateRange | range | Optional date range for showing a preload notice. If not specified, the preload notice is currently valid with no expiration date. The dateRange is a UTC long which is the number of milliseconds since the standard base time known as "the epoch", January 1, 1970, 00:00:00 UTC. |
groupMembership | string | Optional list of group memberships to match against the current groups a user is associated with. If it matches, the preload notice is displayed. This feature enables an administrator to target a user of a certain group membership. Because we cannot know the configured groups, an administrator can add from group names that cannot exceed 255 characters. |
totalHits | string | The number of times the preload notice is displayed to the user. It requires a counter in the preload notice user database to count the number of times the user sees the preload notice. The counter must increment at each viewing of the preload notice. If not specified, totalHits is assumed to be unlimited; otherwise a numeric threshold greater than 0 must be specified. |
Rule/Group Name | Type | Description |
---|---|---|
ea.rule.preloadNotice.default.time | group | Group containing all attributes used in resolving when preload notices are displayed. This is for time-related rules that are mutually exclusive with each other. |
nthDay | int | Optional integer to display the preload notice once every n or more days since the preload notice was last shown. This enables recurring notices to the preload notice. |
daysOfWeek | enumeration | Optional enumeration of the days of week that
the preload notice is displayed. If the current day matches one of
the days in the enumeration, the preload notice is displayed. The
valid values are: 1 – Sunday This can be configured with a nTimesPerDay child <Attribute> element which specifies an integer used to limit the number of times the preload notice is shown for each day in the enumeration. By default, the preload notice is displayed all day. |
Attribute/Group Name | Type | Description |
---|---|---|
themeView | String | Contains the type of smartphone view. Valid
values are:
|