Nitido Inc.

com.nitido.nim
Class Application

java.lang.Object
  extended by com.nitido.nim.Application

public class Application
extends java.lang.Object

The data object that represent the Application data from the BrandService. It provides the information and settings for an application for a specific user. Other than activation, this object is not designed for changes. Application should be extremely careful when adding/removing the application preferences. (It is recommended to control it within a synchronized block. Otherwise, we may ran into infinite loop problem due to simultaneous access to a HashMap (see Sun's JavaDoc for details))

See Also:
Brand, BrandService

Field Summary
protected  java.lang.String _appId
          Application ID.
protected  java.util.Map<java.lang.String,java.lang.String> _appPrefs
          Any personal preferences the current user has for this application.
protected  java.lang.String _description
          Application description.
protected  java.lang.String _newObjectURI
          The URL to create a new object (new contact, email, event, etc), if any.
protected  boolean _requiresActivation
          Whether this application requires some sort of activation or can be used by the user right away.
protected  java.lang.String _settingsURI
          The URL of the settings page for this app, if any.
 
Constructor Summary
Application(java.lang.String appId)
          Minimal constructor.
Application(java.lang.String appId, java.lang.String description, boolean activation, java.lang.String settingsURI, java.lang.String newURI, java.util.Map<java.lang.String,java.lang.String> prefs)
          Complete application constructor.
 
Method Summary
 java.lang.String getAppId()
          Get the application ID.
 java.lang.String getDescription()
          Get the application description.
 java.lang.String getNewObjectURI()
          Get the URI of the new object page for the application.
 java.lang.String getPreference(java.lang.String prefName)
          Get a user's preference for this application.
 java.lang.String getSettingsURI()
          Get the URI of the settings page for the application.
 boolean isActivated()
          Returns whether this application is activated and ready to use.
 boolean requiresActivation()
          Returns whether this application requires activation.
 java.lang.String toString()
          Return a string representation of the content of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_appId

protected final java.lang.String _appId
Application ID.


_description

protected final java.lang.String _description
Application description.


_requiresActivation

protected final boolean _requiresActivation
Whether this application requires some sort of activation or can be used by the user right away.


_settingsURI

protected final java.lang.String _settingsURI
The URL of the settings page for this app, if any.


_newObjectURI

protected final java.lang.String _newObjectURI
The URL to create a new object (new contact, email, event, etc), if any.


_appPrefs

protected final java.util.Map<java.lang.String,java.lang.String> _appPrefs
Any personal preferences the current user has for this application. Standard preferences: 'isActivated' if the application required activation, the presence of this pref key mapping will indicate that the activation process for this user has been completed, its absence will indicate the opposite

Constructor Detail

Application

public Application(java.lang.String appId,
                   java.lang.String description,
                   boolean activation,
                   java.lang.String settingsURI,
                   java.lang.String newURI,
                   java.util.Map<java.lang.String,java.lang.String> prefs)
Complete application constructor.

Parameters:
appId - application ID
description - application description
activation - requires activation boolean flag
settingsURI - the URL to the settings page for this app
newURI - the URL to the new object page for this app
prefs - user's personal preferences for this app

Application

public Application(java.lang.String appId)
Minimal constructor. Values for description, settingsURI, newObjectURI are set to null. requiresActivation is set to false and the personal preferences are empty.

Parameters:
appId - the applicaiton ID
Method Detail

isActivated

public boolean isActivated()
Returns whether this application is activated and ready to use.

Returns:
returns false if this application required activation but has not been activated for the current user, returns true otherwise

getAppId

public java.lang.String getAppId()
Get the application ID.

Returns:
the application ID

getDescription

public java.lang.String getDescription()
Get the application description.

Returns:
application description

requiresActivation

public boolean requiresActivation()
Returns whether this application requires activation.

Returns:
true if this application requires activation, false otherwise

getSettingsURI

public java.lang.String getSettingsURI()
Get the URI of the settings page for the application.

Returns:
the URI of the settings page for this application

getNewObjectURI

public java.lang.String getNewObjectURI()
Get the URI of the new object page for the application.

Returns:
the URI of the new object page for this application

getPreference

public java.lang.String getPreference(java.lang.String prefName)
Get a user's preference for this application.

Parameters:
prefName - the name of the user preference
Returns:
the value of the user preference, or null if one wasn't found

toString

public java.lang.String toString()
Return a string representation of the content of this object. This method is mainly used by debug message generation.

Overrides:
toString in class java.lang.Object

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.