com.ibm.portal.outbound.config
Interface OutboundConnectionModelController

All Superinterfaces:
Committable, Controller, Disposable, ModelController<Administrable,ModifiableNode>

public interface OutboundConnectionModelController
extends Committable, ModelController<Administrable,ModifiableNode>

This is the controller object for the outbound connection model.
The OutboundConnectionModelController object is instantiated from the connection model, if the application wants to modify outbound connection configuration settings. The controller object allows services to

Note that the user must have permissions to administer the Outbound Connection configurations.
The following code examples illustrates how to get an outbound connections model controller from a given model.

OutboundConnectionModel model;
˙˙˙
Context ctx = new javax.naming.InitialContext();
OutboundConnectionModelControllerHome home = (OutboundConnectionModelControllerHome)
ctx.lookup("portal:service/model/OutboundConnectionModelController");

OutboundConnectionModelController controller = home.getOutboundConnectionModelControllerProvider().
getOutboundConnectionModelController(model);

Since:
8.5.0
See Also:
OutboundConnectionModelControllerHome, OutboundConnectionModel, PolicyMapping, PolicyRule, CookieRule, PolicyVariable

Method Summary
 boolean confirmDelete(Administrable aNode)
          Check if the presented outbound connection model item can be removed.
 ModifiableNode create(java.lang.Class<?> aNodeClass, CreationContext aContext)
          Create a new outbound connection model element.
 void delete(Administrable elem)
          remove the outbound connection model element.
 
Methods inherited from interface com.ibm.portal.Committable
commit, dispose
 
Methods inherited from interface com.ibm.portal.ModelController
confirmCreate, confirmGetModifiableNode, getModifiableNode, resolve
 

Method Detail

create

ModifiableNode create(java.lang.Class<?> aNodeClass,
                      CreationContext aContext)
                      throws CannotInstantiateModifiableNodeException
Create a new outbound connection model element.

Specified by:
create in interface ModelController<Administrable,ModifiableNode>
Parameters:
aNodeClass - The class of the object being created. Use one of the following classes
ModifiableOutboundConnectionProfile
creates a new connection profile.
ModifiablePolicyMapping
creates a policy mapping node
ModifiablePolicyRule
creates a policy rule object
ModifiableCookieRule
creates a cookie rule object
ModifiablePolicyVariable
creates a policy variable node
aContext - the creation context. Defines information about the parent node and initial required settings. Must not be null. Use the OutboundConnectionCreationContextBuilderFactory singleton to build CreationContext objects that fit to the node that you create.
Returns:
a modifiable node;
Throws:
CannotInstantiateModifiableNodeException - The object could not be created. The nested exception contains detail information.

confirmDelete

boolean confirmDelete(Administrable aNode)
                      throws ObjectNotFoundException
Check if the presented outbound connection model item can be removed.

Parameters:
aNode - The coonfiguration item. Note that only items are permitted, that are either owned by this controller, or objects that are owned by the OutboundConnectionModel from which this controller item has been created).
Returns:
true if the object can be removed, false if not.
Throws:
ObjectNotFoundException - The presented object does not exist. Probably, the item has already been removed.

delete

void delete(Administrable elem)
            throws ObjectNotFoundException,
                   CannotDeleteNodeException
remove the outbound connection model element. Note that, although this object immediately disappears from the model, the object is not removed from the database backend unless the controller changes are committed.

Parameters:
elem - The element to be removed.
Throws:
ObjectNotFoundException - The object could not be found. Probably, it already has been removed.
CannotDeleteNodeException - The node cannot be removed (for example, because it belongs to the system profile, or the user does not have sufficient permissions to remove the item.