oracle.panama.model
Interface Service

All Superinterfaces:
ModelObject, XMLObject
All Known Subinterfaces:
Alert, ExternalLink, Folder, Link, LocalModule, MasterService, Module

public interface Service
extends ModelObject

The Service is an "abstract" interface and handles all generic aspects of a service.


Field Summary
TypeField
static int CATEGORY_MASTER
           
static int CATEGORY_SERVICE
           
static int CATEGORY_USER_HOME
           
static int TYPEID
          The type id of this class.
static java.lang.String TYPENAME
          The constant class type identifier
 
Method Summary
TypeMethod
 long getAreaId()
          Gets the areaId property (long) value.
 int getCategory()
          Get the Folder category.
 int getCost()
          get cost for the Service
 java.lang.String getDescription()
           
 Group[] getGroups()
           
 Folder getParent()
          Get the parent folder of this service.
 java.lang.String getPrimaryAudio()
          Gets the primary audio property (String) value.
 java.lang.String getPrimaryImage()
          Gets the primary image property (String) value.
 java.lang.String getSecondaryAudio()
          Gets the secondary audio property (String) value.
 java.lang.String getSecondaryImage()
          Gets the secondary image property (String) value.
 int getSequenceNo()
           
 java.lang.String getShortName()
          Gets the shortName for a Service.
 Transformer getTransformer(Device device)
          A service can override a device default transformer.
 java.lang.String getURL()
           
 java.lang.String getURLPathParameter()
          Returns the URL to the Service.
 User getUserOwner()
           
 void invoke(ServiceContext context)
          Invokes a Service.
 boolean isValid()
           
 boolean isViewCustomizable()
          Gets the view customizability status
 boolean isVisible()
           
 void removeAllGroups()
          Remove the current service from all groups it is belongs to
 void setAreaId(long areaId)
          Sets the areaId property (long) value.
 void setCategory(int category)
          Set the Folder category.
 void setCost(int cost)
          Set cost for the Service.
 void setDescription(java.lang.String description)
           
 void setGroups(Group[] groups)
           
 void setParent(Folder parent)
          Move this service into a folder.
 void setPrimaryAudio(java.lang.String primaryAudio)
          Sets the primary audio property (String) value.
 void setPrimaryImage(java.lang.String primaryImage)
          Sets the primary image property (String) value.
 void setSecondaryAudio(java.lang.String secondaryAudio)
          Sets the secondary audio property (String) value.
 void setSecondaryImage(java.lang.String secondaryImage)
          Sets the secondary image property (String) value.
 void setSequenceNo(int sequenceNo)
          Sets the sequence number for ordering.
 void setShortName(java.lang.String shortName)
          Sets the shortName for a Service.
 void setUserOwner(User owner)
          Set the owner of this service.
 void setValid(boolean valid)
          Allow the administrator to set a service to valid or invalid.
 void setViewCustomizable(boolean value)
          Sets the view customizability status
 void setVisible(boolean visible)
          Allow the administrator to set the visibility of a service.
 
Methods inherited from interface oracle.panama.model.ModelObject
delete, getCreatedDate, getId, getLastModifiedDate, getName, getTypeId, getTypeName, isSystem, setName, setSystem, undoAll
 
Methods inherited from interface oracle.panama.model.XMLObject
setXML, toXML
 

Field Detail

TYPENAME

public static final java.lang.String TYPENAME
The constant class type identifier

TYPEID

public static final int TYPEID
The type id of this class.

CATEGORY_SERVICE

public static final int CATEGORY_SERVICE

CATEGORY_MASTER

public static final int CATEGORY_MASTER

CATEGORY_USER_HOME

public static final int CATEGORY_USER_HOME
Method Detail

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description text.

getDescription

public java.lang.String getDescription()
Returns:
the description or null if not set.

getURL

public java.lang.String getURL()
Returns:
the derived and unqiue path to this service.

getURLPathParameter

public java.lang.String getURLPathParameter()
Returns the URL to the Service. The URL can be of 2 kinds:

NB. A service in this context can be an external link.

Returns:
a string which point to the service.

getSequenceNo

public int getSequenceNo()
Returns:
the sequence number used for ordering.

setSequenceNo

public void setSequenceNo(int sequenceNo)
Sets the sequence number for ordering.
Parameters:
seqno - the sequence number.

isVisible

public boolean isVisible()
Returns:
true if this Service should be visible for the user.

setVisible

public void setVisible(boolean visible)
Allow the administrator to set the visibility of a service.
Parameters:
visible - true if visible otherwise false.

isValid

public boolean isValid()
Returns:
true If this Service is valid.

setValid

public void setValid(boolean valid)
Allow the administrator to set a service to valid or invalid.
Parameters:
valid - true if valid or false if not.

getUserOwner

public User getUserOwner()
Returns:
the owner of this service or null if none

setUserOwner

public void setUserOwner(User owner)
Set the owner of this service.
Parameters:
user - the owner.

getParent

public Folder getParent()
Get the parent folder of this service.
Returns:
the folder or null if none (root).

setParent

public void setParent(Folder parent)
Move this service into a folder. A service can only exists in one folder at the time.
Parameters:
folder - the Folder to put this service into, a null folder is equals to the root folder (no parent).

getShortName

public java.lang.String getShortName()
Gets the shortName for a Service. The shortName should be unique for a user. Used when invoked from a SMS.
Returns:
the shortName

setShortName

public void setShortName(java.lang.String shortName)
Sets the shortName for a Service. The shortName should be unique for a user. Used when invoked from a SMS.
Parameters:
shortName - The new shortName for this Service

getCost

public int getCost()
get cost for the Service
Returns:
cost

setCost

public void setCost(int cost)
Set cost for the Service. Cost is in any customer specific unit, the Service does not use this attribute in any logic.
Parameters:
cost - the cost in any unit

getAreaId

public long getAreaId()
Gets the areaId property (long) value.
Returns:
The areaId property value.
See Also:
setAreaId(long)

setAreaId

public void setAreaId(long areaId)
Sets the areaId property (long) value.
Parameters:
aAreaId - The new value for the property.
See Also:
getAreaId()

invoke

public void invoke(ServiceContext context)
            throws java.lang.Exception
Invokes a Service.

Parameters:
context - the ServiceContext.
Throws:
java.lang.Exception - when any error occurs.

getTransformer

public Transformer getTransformer(Device device)
A service can override a device default transformer.
Returns:
the transformer for this service if overrided the service specific transformer is returned, otherwise the default transformer for this device is returned.

setViewCustomizable

public void setViewCustomizable(boolean value)
Sets the view customizability status
Parameters:
value - The view customizability status

isViewCustomizable

public boolean isViewCustomizable()
Gets the view customizability status
Returns:
The view customizability status

getPrimaryImage

public java.lang.String getPrimaryImage()
Gets the primary image property (String) value.

setPrimaryImage

public void setPrimaryImage(java.lang.String primaryImage)
Sets the primary image property (String) value.

getSecondaryImage

public java.lang.String getSecondaryImage()
Gets the secondary image property (String) value.

setSecondaryImage

public void setSecondaryImage(java.lang.String secondaryImage)
Sets the secondary image property (String) value.

getPrimaryAudio

public java.lang.String getPrimaryAudio()
Gets the primary audio property (String) value.

setPrimaryAudio

public void setPrimaryAudio(java.lang.String primaryAudio)
Sets the primary audio property (String) value.

getSecondaryAudio

public java.lang.String getSecondaryAudio()
Gets the secondary audio property (String) value.

setSecondaryAudio

public void setSecondaryAudio(java.lang.String secondaryAudio)
Sets the secondary audio property (String) value.

getGroups

public Group[] getGroups()
Returns:
Group[] the groups the service belongs to.
See Also:
setGroups(oracle.panama.model.Group[])

setGroups

public void setGroups(Group[] groups)
Parameters:
groups - the list of groups the service belongs to
See Also:
getGroups()

removeAllGroups

public void removeAllGroups()
Remove the current service from all groups it is belongs to
See Also:
setGroups(oracle.panama.model.Group[])

getCategory

public int getCategory()
Get the Folder category. It is one of the predefined types:
Returns:
int the Folder category
See Also:
setCategory(int)

setCategory

public void setCategory(int category)
Set the Folder category.
Parameters:
category - The Folder category
See Also:
getCategory()