Interface IAliasPolicy2
- All Superinterfaces:
IBizPolicy
,IComponent
,IInitializable
,ISystemHandler
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createAlias
(IContext context, String key, IURI target, boolean isSystem) This will create a new alias.String[]
listAliases
(IContext context, IURI target) Returns an array of all the aliases that exist for this targetlookupAlias
(IContext context, String key) Retrieve the appropriateAliasValue
based on a simple key.void
removeAlias
(IContext context, String key) Removes an alias previously created.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
-
Method Details
-
createAlias
This will create a new alias. The source key is what will be passed in to subsequent calls to
lookupAlias(com.webmethods.portal.bizPolicy.IContext, java.lang.String)
to retrieve theAliasValue
which will represent the target.IsSystem specifies extra restrictions placed upon this alias. If this is set to true, then this alias can not be removed through the alias administration portlet, and will require an administrator invoking apis directly to remove this alias.
- Parameters:
context
- Command context (user state information).isSystem
- whether this is a protected system alias- Throws:
BizException
- See Also:
-
IAliasCache
AliasValue
-
lookupAlias
Retrieve the appropriateAliasValue
based on a simple key. The key is 'object' passed in from a previous call tocreateAlias(com.webmethods.portal.bizPolicy.IContext, java.lang.String, com.webmethods.portal.system.IURI, boolean)
. If an alias is found, you can get the 'target' by callingAliasValue#getValue
. Other information is also available on theAliasValue
.- Parameters:
context
- Command context (user state information).key
- an arbitary key that may be aIURI
or a String- Returns:
- the
AliasValue
if found, NULL otherwise - Throws:
BizException
-
listAliases
Returns an array of all the aliases that exist for this target- Parameters:
context
- Command context (user state information).- Throws:
BizException
-
removeAlias
Removes an alias previously created. The key is 'object' passed in from a previous call tocreateAlias(com.webmethods.portal.bizPolicy.IContext, java.lang.String, com.webmethods.portal.system.IURI, boolean)
. Note, if this alias was created as a 'system' alias, then you will not have access rights to remove it, unless you first disable theITraits
on theIContext
.- Parameters:
context
- Command context (user state information).key
- an arbitary key that may be aIURI
or a String- Throws:
BizException
-