public interface IAliasPolicy2 extends IBizPolicy
Modifier and Type | Method and Description |
---|---|
void |
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 target
|
IAliasValue |
lookupAlias(IContext context,
String key)
Retrieve the appropriate
AliasValue based on a simple key. |
void |
removeAlias(IContext context,
String key)
Removes an alias previously created.
|
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
void createAlias(IContext context, String key, IURI target, boolean isSystem) throws BizException
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 the AliasValue
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.
context
- Command context (user state information).isSystem
- whether this is a protected system aliasBizException
IAliasCache
,
AliasValue
IAliasValue lookupAlias(IContext context, String key) throws BizException
AliasValue
based on a simple key. The key is 'object' passed in from a previous call
to createAlias(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 calling AliasValue#getValue
.
Other information is also available on the AliasValue
.context
- Command context (user state information).key
- an arbitary key that may be a IURI
or a StringAliasValue
if found, NULL otherwiseBizException
String[] listAliases(IContext context, IURI target) throws BizException
context
- Command context (user state information).BizException
void removeAlias(IContext context, String key) throws BizException
createAlias(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 the ITraits
on the IContext
.context
- Command context (user state information).key
- an arbitary key that may be a IURI
or a StringBizException