Interface IAliasPolicy

All Superinterfaces:
IBizPolicy, IComponent, IInitializable, ISystemHandler
All Known Subinterfaces:
ITopicSpacePolicy

public interface IAliasPolicy extends IBizPolicy

Policy for querying, creating and removing aliases.

Aliases are a persistent pseudonym for various things, including portal resources, uri's or arbitrary strings. Once you have created an alias using createAlias(com.webmethods.portal.bizPolicy.IContext, java.lang.Object, java.lang.Object, java.lang.String, boolean), then you can lookup the target of that alias using lookupAlias(com.webmethods.portal.bizPolicy.IContext, java.lang.Object).

This becomes especially useful for creating friendly names for portal resources. For example, if you want to browse to the help topic, instead of typing in /server/nis/meta/default/topic/000000043 (assuming you had that memorized), you could instead type: /server/nis/topic.help and you would get automatically redirected to the help topic.

Alias resolution like the example above works, because calls to PortalSystem.acquireURI(java.lang.String) automatically ties into the the IAliasMechanics which implements the IURIResolver. Therefore, any call to find the IURI for 'topic.help' results in the appropriate IThingID for the help topic. This is done transparently to the client of the IAliasPolicy, and is a useful by product of using this api.

Finally, aliases are persistent and clustered. This means that once you set an alias, by calling createAlias(com.webmethods.portal.bizPolicy.IContext, java.lang.Object, java.lang.Object, java.lang.String, boolean), the alias will be stored in the database, and (relatively) immediately available throughout the cluster. As a result, they are optimized for lookups, not creation calls.

Note: When setting portal resource uri's as keys, you should use ITopicSpacePolicy instead.