oracle.panama.model
Interface ModelFactory


public interface ModelFactory

The model factory. The entry point to create model objects.


Method Summary
TypeMethod
 Adapter createAdapter(java.lang.String name, java.lang.String classname)
          Create a new adapter.
 Adapter createAdapter(java.lang.String name, java.lang.String classname, java.io.InputStream classes)
          Create a new adapter.
 Alert createAlert(java.lang.String name, User owner, Service forService, AlertAddress[] addresses, Folder parent)
          Create a new Job.
 AlertAddress createAlertAddress(java.lang.String name, User user, Device device, java.lang.String address)
          Deprecated. As of IAS 1.2, replaced by #createDeviceAddress(String, User, DeliveryType, String)
 AlertService createAlertService(java.lang.String name, MasterAlertService masterAlert)
          Create a new Alert Service
 Arguments createArguments()
          Create new Arguments.
 AsyncArguments createAsyncArguments()
          Create Async Arguments.
 Community createCommunity(User creator, java.lang.String cmtyName, java.lang.String cmtyType)
          Create Community
 DataFeeder createDataFeeder(java.lang.String name)
          Create new DataFeeder.
 Device createDevice(java.lang.String name, Transformer transformer)
          Create a new Device
 DeviceAddress createDeviceAddress(java.lang.String name, User user, DeliveryType deliveryType, java.lang.String address)
          Create new Device Address
 ExternalLink createExternalLink(java.lang.String name, User owner, java.lang.String url, Folder parent)
          Create a new ExternalLink
 Folder createFolder(java.lang.String name, User owner, Folder parent)
          Create a new Folder
 Group createGroup(java.lang.String name)
          Create a new Group
 JavaTransformer createJavaTransformer(java.lang.String name, java.lang.String className)
          Create a new Java transformer.
 Link createLink(java.lang.String name, User owner, Service forService, Folder parent)
          Create a new Link
 LocalModule createLocalModule(java.lang.String name, User owner, MasterService forMasterService, Folder parent, java.lang.String virtualURL)
          Create a new LocalModule
 LocationMark createLocationMark(java.lang.String name, User user)
          Create a new LocationMark
 LocationPrivacyAuth createLocationPrivacyAuth(Service serivce, User owner, Community positionRequester, AuthPeriod period)
          Create LocationPrivacyAuth
 LocationPrivacyAuth createLocationPrivacyAuth(Service service, User owner, User positionRequester, AuthPeriod period)
          Create LocationPrivacyAuth
 MasterAlertService createMasterAlertService(java.lang.String name, boolean timeBaseEnable, java.lang.String description, DataFeeder dataFeed)
          Create a new Master Alert
 MasterService createMasterService(java.lang.String name, User owner, Adapter adapter, Folder parent)
          Create a new master service.
 OutputArguments createOutputArguments()
          Create new OutputArguments.
 PassThroughDataFeeder createPassThroughDataFeeder(java.lang.String name)
          Create new DataFeeder.
 PresetCategory createPresetCategory(java.lang.String name)
          Create a new Preset Category
 Role createRole(java.lang.String name)
          Create a new Role
 Topic createTopic(java.lang.String name, Topic parent)
          Create a new topic
 User createUser(java.lang.String name)
          Create a new user.
 User createUser(java.lang.String name, Group[] groups)
          Create a new user.
 User createUserFromOID(java.lang.String guid)
          Create a new Registered User in the panama repository.
 User createUserFromOIDByName(java.lang.String name)
          Create a new Registered User in the panama repository.
 User createVirtualUser(java.lang.String subscriberId)
          Create a new virtual user.
 XSLTransformer createXSLTransformer(java.lang.String name, org.w3c.dom.Element stylesheet)
          Create a new XSL transformer.
 XSLTransformer createXSLTransformer(java.lang.String name, java.lang.String stylesheet)
          Create a new XSL transformer.
 AlertSubscriber lookupAlertSubscriber(User subscriber, DeviceAddress alertDeviceAddress)
          Look up an AlertSubscriber
 void releaseResources()
          Release the resources such as data source connections.
 void save()
          Save work
Save applies to all created or modified object in the current thread.
 void undoAll()
          Undo all changes
Undo applies to all created or modified object in the current thread.
 

Method Detail

createAdapter

public Adapter createAdapter(java.lang.String name,
                             java.lang.String classname)
                      throws PanamaException
Create a new adapter.
Parameters:
name - the name.
className - the name of the class implementing the adapter.
Returns:
the adapter.
Throws:
PanamaException - when unable to create the adapter.

createAdapter

public Adapter createAdapter(java.lang.String name,
                             java.lang.String classname,
                             java.io.InputStream classes)
                      throws PanamaException
Create a new adapter.
Parameters:
name - the name.
className - the name of the class implementing the adapter.
classes - the archive (The server will close the InputStream)
Returns:
the adapter.
Throws:
PanamaException - when unable to create the adapter.

createMasterService

public MasterService createMasterService(java.lang.String name,
                                         User owner,
                                         Adapter adapter,
                                         Folder parent)
                                  throws PanamaException
Create a new master service.
Parameters:
name - the non null name, mandatory
owner - the non null owner of this MasterService, mandatory
adapter - the adapter.
parent - the master service is placed in this Folder, if null it's placed in the virtual root folder.
Returns:
MasterService the master service.
Throws:
PanamaException - when unable to create the master service.

createLink

public Link createLink(java.lang.String name,
                       User owner,
                       Service forService,
                       Folder parent)
                throws PanamaException
Create a new Link
Parameters:
name - the non null name, mandatory
owner - the non null owner of this Link, mandatory
forService - forService non null Service that this Link points to, mandatory
parent - the Link is placed into this Folder, if null it's placed in the root Folder
Returns:
Link the link.
Throws:
PanamaException - when unable to create the link.

createLocalModule

public LocalModule createLocalModule(java.lang.String name,
                                     User owner,
                                     MasterService forMasterService,
                                     Folder parent,
                                     java.lang.String virtualURL)
                              throws PanamaException
Create a new LocalModule
Parameters:
name - the non null name, mandatory
owner - the non null owner of this Link, mandatory
forMasterService - forMasterService non null MasterService that this LocalModule points to, mandatory
parent - the LocalModule is placed into this Folder, if null it's placed in the root Folder
virtualURL - the non null omp:// URL, mandatory
Returns:
LocalModule the link.
Throws:
PanamaException - when unable to create the link.

createExternalLink

public ExternalLink createExternalLink(java.lang.String name,
                                       User owner,
                                       java.lang.String url,
                                       Folder parent)
                                throws PanamaException
Create a new ExternalLink
Parameters:
name - the non null name, mandatory
owner - the non null owner of this Bookmark, mandatory
url - the non null external reference link, mandatory
parent - the Bookmark is placed into this Folder, if null it's placed in the root Folder
Returns:
ExternalLink the new ExternalLink.
Throws:
PanamaException - when unable to create the bookmark.

createAlert

public Alert createAlert(java.lang.String name,
                         User owner,
                         Service forService,
                         AlertAddress[] addresses,
                         Folder parent)
                  throws PanamaException
Create a new Job.
Parameters:
name - the non null name, mandatory
owner - the non null owner of this Alert, mandatory
forService - forService non null Service that this Alert points to, mandatory
addresses - the address this Alert shall send it's result to, mandatory
parent - the Job is placed into this Folder, if null it's placed in the root Folder
Returns:
Alert the alert.
Throws:
PanamaException - when unable to create the Alert.

createFolder

public Folder createFolder(java.lang.String name,
                           User owner,
                           Folder parent)
                    throws PanamaException
Create a new Folder
Parameters:
name - the non null name, mandatory
owner - the non null owner of this Folder, mandatory
parent - the Folder is a Sub-Folder to this parent, if null it's placed in the root Folder
Returns:
Folder the folder.
Throws:
PanamaException - when unable to create the folder.

createUser

public User createUser(java.lang.String name)
                throws PanamaException
Create a new user. This method will use the properties in core.oracle.panama.core.admin.Provisioning.properties to create user home folder and to assign groups to the new user
Parameters:
name - the not null name of the panama user, mandatory.
Returns:
the user.
Throws:
PanamaException - when unable to create the user.

createVirtualUser

public User createVirtualUser(java.lang.String subscriberId)
                       throws PanamaException
Create a new virtual user. This method will user the properties in oracle.panama.core.admin.System.properties to create user's home folder and to assign groups to the new user
Parameters:
subscriberId - the subsriberId of the user
Returns:
the user
Throws:
PanamaException - when unable to create the user

createUserFromOID

public User createUserFromOID(java.lang.String guid)
                       throws PanamaException
Create a new Registered User in the panama repository. The user information is loaded from the Oracle Internet Directory (OID).
Parameters:
guid - the global unique identifier of the User
Returns:
the user
Throws:
PanamaException - when unable to create the user

createUserFromOIDByName

public User createUserFromOIDByName(java.lang.String name)
                             throws PanamaException
Create a new Registered User in the panama repository. The user information is loaded from the Oracle Internet Directory (OID).
Parameters:
name - the user name
Returns:
the user
Throws:
PanamaException - when unable to create the user

createUser

public User createUser(java.lang.String name,
                       Group[] groups)
                throws PanamaException
Create a new user. This method will use the properties in core.oracle.panama.core.admin.Provisioning.properties to create user home folder.
Parameters:
name - the not null name of the panama user, mandatory.
groups - the list of groups this user belongs to or null if none.
Returns:
the user.
Throws:
PanamaException - when unable to create the user.

createGroup

public Group createGroup(java.lang.String name)
                  throws PanamaException
Create a new Group
Parameters:
name - the not null name of the PanamaGroup, mandatory
Returns:
the group.
Throws:
PanamaException - when unable to create the group.

createRole

public Role createRole(java.lang.String name)
                throws PanamaException
Create a new Role
Parameters:
name - the not null name of the Role, mandatory
Returns:
the role.
Throws:
PanamaException - when unable to create the role.

createAlertAddress

public AlertAddress createAlertAddress(java.lang.String name,
                                       User user,
                                       Device device,
                                       java.lang.String address)
                                throws PanamaException
Deprecated. As of IAS 1.2, replaced by #createDeviceAddress(String, User, DeliveryType, String)

Create a new alert address
Parameters:
name - the not null name of the alert address, mandatory
user - the user this address belongs, mandatory
device - the Device this address belongs, mandatory
address - the non null address, mandatory
Returns:
the address.
Throws:
PanamaException - when unable to create the address.

createDeviceAddress

public DeviceAddress createDeviceAddress(java.lang.String name,
                                         User user,
                                         DeliveryType deliveryType,
                                         java.lang.String address)
                                  throws PanamaException
Create new Device Address
Parameters:
name - the not null name of the device address, mandatory
user - the user this address belongs, mandatory
deliveryType - the delivery type, mandatory
address - the non null address, mandatory
Returns:
the device address
Throws:
PanamaException - when unable to create the device address

createLocationMark

public LocationMark createLocationMark(java.lang.String name,
                                       User user)
                                throws PanamaException
Create a new LocationMark
Parameters:
name - the not null name of the LocationMark, mandatory
user - the user this LocationMark belongs, mandatory
Returns:
the address.
Throws:
PanamaException - when unable to create the LocationMark.

createDevice

public Device createDevice(java.lang.String name,
                           Transformer transformer)
                    throws PanamaException
Create a new Device
Parameters:
name - the not null name of the LogicalDevice, mandatory
transformer - the not null default Transformer
Throws:
PanamaException - when unable to create the logical device.

createJavaTransformer

public JavaTransformer createJavaTransformer(java.lang.String name,
                                             java.lang.String className)
                                      throws PanamaException
Create a new Java transformer.
Parameters:
name - the name of this transformer.
className - the implementing Java Class name.
Returns:
the Java transformer.
Throws:
PanamaException - when unable to create the Java transformer.

createXSLTransformer

public XSLTransformer createXSLTransformer(java.lang.String name,
                                           java.lang.String stylesheet)
                                    throws PanamaException
Create a new XSL transformer.
Parameters:
name - the name of this transformer.
stylesheet - the XSL stylesheet as a XML element.
Returns:
the XSL transformer.
Throws:
PanamaException - when unable to create the XSL transformer.

createXSLTransformer

public XSLTransformer createXSLTransformer(java.lang.String name,
                                           org.w3c.dom.Element stylesheet)
                                    throws PanamaException
Create a new XSL transformer.
Parameters:
name - the name of this transformer.
stylesheet - the XSL stylesheet as a XML element.
Returns:
the XSL transformer.
Throws:
PanamaException - when unable to create the XSL transformer.

createArguments

public Arguments createArguments()
                          throws PanamaException
Create new Arguments.
Returns:
Arguments the Arguments.
Throws:
PanamaException - when unable to create the Arguments.

createOutputArguments

public OutputArguments createOutputArguments()
                                      throws PanamaException
Create new OutputArguments.
Returns:
OutputArguments the OutputArguments.
Throws:
PanamaException - when unable to create the OutputArguments.

createPassThroughDataFeeder

public PassThroughDataFeeder createPassThroughDataFeeder(java.lang.String name)
                                                  throws PanamaException
Create new DataFeeder.
Returns:
PassThroughDataFeeder the PassThroughDataFeeder.
Throws:
PanamaException - when unable to create the PassThroughDataFeeder.

createDataFeeder

public DataFeeder createDataFeeder(java.lang.String name)
                            throws PanamaException
Create new DataFeeder.
Returns:
DataFeeder the DataFeeder.
Throws:
PanamaException - when unable to create the DataFeeder.

createTopic

public Topic createTopic(java.lang.String name,
                         Topic parent)
                  throws PanamaException
Create a new topic
Parameters:
name - the non null name of the topic
parentName - the optional null parent of this topic
Returns:
Topic the topic
Throws:
PanamaException - when unable to create the topic

createMasterAlertService

public MasterAlertService createMasterAlertService(java.lang.String name,
                                                   boolean timeBaseEnable,
                                                   java.lang.String description,
                                                   DataFeeder dataFeed)
                                            throws PanamaException
Create a new Master Alert
Parameters:
name - the non null name of the topic
timeBaseEnable - flag to indicate if time based alert is enabled
personalizationEnabled - flag to indicate if its personalization enabled
transcodeRequired - flag to indicate if transcode required
description - description
formattedXml - formatted Xml Document
dataFeed - Data feeder object
Returns:
MasterAlertService the Master Alert Service
Throws:
PanamaException - when unable to create the Master Alert Service

createAlertService

public AlertService createAlertService(java.lang.String name,
                                       MasterAlertService masterAlert)
                                throws PanamaException
Create a new Alert Service
Parameters:
name - the non null name of the alert service
masterAlertOid - the non null master alert object
Returns:
AlertService the Alert Service
Throws:
PanamaException - when unable to create the Alert Service

createPresetCategory

public PresetCategory createPresetCategory(java.lang.String name)
                                    throws PanamaException
Create a new Preset Category
Parameters:
name - the non null name of the category
Returns:
PresetCategory the Preset Category
Throws:
PanamaException - when unable to create the Preset Category

save

public void save()
          throws PanamaException
Save work
Save applies to all created or modified object in the current thread. The objects are saved to the persistent storage and the transaction is commited.
Throws:
PanamaException - when unable to save the work.

undoAll

public void undoAll()
             throws PanamaException
Undo all changes
Undo applies to all created or modified object in the current thread.
Throws:
PanamaException - when unable to save the work.

releaseResources

public void releaseResources()
Release the resources such as data source connections.

createAsyncArguments

public AsyncArguments createAsyncArguments()
                                    throws PanamaException
Create Async Arguments.
Returns:
AsyncArguments the Async Arguments.
Throws:
PanamaException - when unable to create the Arguments.

createLocationPrivacyAuth

public LocationPrivacyAuth createLocationPrivacyAuth(Service service,
                                                     User owner,
                                                     User positionRequester,
                                                     AuthPeriod period)
                                              throws PanamaException
Create LocationPrivacyAuth
Parameters:
service - the service in which the authrorization is created
owner - the user who grants the authrorization
positionRequester - the user who gets the authorization
AuthPeriod - the time range when the positionRequester is authorized to access the owner's location information
Returns:
LocationPrivacyAuth an interface to the created LocationPrivacyAuth
Throws:
PanamaException - when unable to create the LocationPrivacyAuth

createLocationPrivacyAuth

public LocationPrivacyAuth createLocationPrivacyAuth(Service serivce,
                                                     User owner,
                                                     Community positionRequester,
                                                     AuthPeriod period)
                                              throws PanamaException
Create LocationPrivacyAuth
Parameters:
service - the service in which the authrorization is to be created
owner - the user who grants the authrorization
positionRequester - the community who gets the authorization
AuthPeriod - the time range when the positionRequester is authorized to access the owner's location information
Returns:
LocationPrivacyAuth an interface to the created LocationPrivacyAuth
Throws:
PanamaException - when unable to create the LocationPrivacyAuth

createCommunity

public Community createCommunity(User creator,
                                 java.lang.String cmtyName,
                                 java.lang.String cmtyType)
                          throws PanamaException
Create Community
Parameters:
creator - the user who creates the community
cmtyName - the name of the community
cmtyType - the type of the community. Three types are defined in the Community interface:CMTY_PRIVATE,CMTY_SHARED,CMTY_SYSTEM
Returns:
Community an interface to the created Community
Throws:
PanamaException - when unable to create the Community
See Also:
Community

lookupAlertSubscriber

public AlertSubscriber lookupAlertSubscriber(User subscriber,
                                             DeviceAddress alertDeviceAddress)
                                      throws PanamaException
Look up an AlertSubscriber
Parameters:
subscriber - the user who subscribes to this alert
alertDeviceAddress - the DeviceAddress this alert will be sent to
Returns:
AlertSubscriber an interface to the alert subscriber found
Throws:
PanamaException - when unable to look up the alert subscriber
See Also:
AlertSubscriber