Skip navigation links


com.essbase.eas.essbase.defs
Class NameUtilities

java.lang.Object
  extended by com.essbase.eas.essbase.defs.NameUtilities


public class NameUtilities
extends java.lang.Object

Field Summary
static short APPLICATION_TITLE_PIECES
           
static short DATABASE_TITLE_PIECES
           
static java.lang.String LEFT_BRACKET
           
static java.lang.String RIGHT_BRACKET
           
static java.lang.String SEPARATOR
           

 

Method Summary
static java.lang.String constructApplicationLabel(Application application)
           
static java.lang.String constructApplicationLabel(Application application, boolean forObjectId)
          constructs a label for an application.
static java.lang.String constructApplicationSource(Application application)
          return an string as a command source for an application
static java.lang.String constructDatabaseLabel(Database db)
           
static java.lang.String constructDatabaseLabel(Database db, boolean forObjectId)
           
static java.lang.String constructDatabaseSource(Database db)
           
static java.lang.String constructDatabaseTitle(java.lang.String[] pieces)
          constructs a title for a database style window or dialog.
static java.lang.String constructDatabaseTitle(java.lang.String base, Database db)
          constructs a title for a database style window or dialog.
static java.lang.String constructObjectLabel(Application app, java.lang.String objectName)
           
static java.lang.String constructObjectLabel(Application app, java.lang.String objectName, boolean forObjectId)
           
static java.lang.String constructObjectLabel(Database db, java.lang.String objectName)
           
static java.lang.String constructObjectLabel(Database db, java.lang.String objectName, boolean forObjectId)
          constructs a name string for an Essbase object that resides in a database.
static java.lang.String constructObjectLabel(Group group)
           
static java.lang.String constructObjectLabel(Group group, boolean forObjectId)
           
static java.lang.String constructObjectLabel(NamedObject nobj)
           
static java.lang.String constructObjectLabel(NamedObject nobj, boolean forObjectId)
           
static java.lang.String constructObjectLabel(java.lang.Object owner, java.lang.String objectName)
           
static java.lang.String constructObjectLabel(java.lang.Object owner, java.lang.String objectName, boolean forObjectId)
           
static java.lang.String constructObjectLabel(User user)
           
static java.lang.String constructObjectLabel(User user, boolean forObjectId)
           
static java.lang.String constructObjectSource(Application app, java.lang.String objectName)
           
static java.lang.String constructObjectSource(Database db, java.lang.String objectName)
           
static java.lang.String constructObjectSource(Group group)
           
static java.lang.String constructObjectSource(NamedObject nobj)
           
static java.lang.String constructObjectSource(java.lang.Object owner, java.lang.String objectName)
           
static java.lang.String constructObjectSource(User user)
           
static java.lang.String constructObjectTitle(java.util.ResourceBundle resource, java.lang.String baseName, Application app, java.lang.String objectName)
           
static java.lang.String constructObjectTitle(java.util.ResourceBundle resource, java.lang.String baseName, Database db, java.lang.String objectName)
          constructs a name string for an Essbase object that resides in a database.
static java.lang.String constructObjectTitle(java.util.ResourceBundle resource, java.lang.String baseName, java.lang.Object owner, java.lang.String objectName)
           
static java.lang.String createCommandSourceFromList(java.lang.String[] names)
          Create an string for use as a command source.
static java.lang.String createCommandSourceFromObject(java.lang.Object object)
           
static java.lang.String createObjectIDFromList(java.lang.Object object)
          Return a string to be used as an object id
static java.lang.String createObjectIDFromList(java.lang.Object object, boolean forObjectId)
          Creates an essbase object identifier string for you by checking the object provided
static java.lang.String createObjectIDFromList(java.lang.String[] names)
          Creates an essbase object identifier string for you; For example, [willow2:Demo:Basic] for a database or [willow2:Demo:Basic:Header1] for a report script.
static java.lang.String createObjectIDFromList(java.lang.String[] names, boolean forObjectId)
          Creates an essbase object identifier string for you; For example, [willow2:Demo:Basic] for a database or [willow2:Demo:Basic:Header1] for a report script.
static java.lang.String createObjectIDFromObject(java.lang.Object object)
           
static java.lang.String getName(java.lang.Object obj)
          This method is used to return the name of the object if defined.
static java.lang.String[] parseObjectId(java.lang.String objectString)
          Parse an Essbase Object Id into it's component parts.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

APPLICATION_TITLE_PIECES

public static final short APPLICATION_TITLE_PIECES
See Also:
Constant Field Values

DATABASE_TITLE_PIECES

public static final short DATABASE_TITLE_PIECES
See Also:
Constant Field Values

LEFT_BRACKET

public static final java.lang.String LEFT_BRACKET
See Also:
Constant Field Values

RIGHT_BRACKET

public static final java.lang.String RIGHT_BRACKET
See Also:
Constant Field Values

SEPARATOR

public static final java.lang.String SEPARATOR
See Also:
Constant Field Values

Method Detail

parseObjectId

public static java.lang.String[] parseObjectId(java.lang.String objectString)
Parse an Essbase Object Id into it's component parts. This can be used in conjunction with the UIFactory class to find a named object Does not check for correctness of name
Parameters:
objectString - of the form [Server.Application.Database.Object]
Returns:
a String[] with Server in String[0], Application in String[1] Database in String[2], Object in String[3].

createObjectIDFromList

public static java.lang.String createObjectIDFromList(java.lang.String[] names)
Creates an essbase object identifier string for you; For example, [willow2:Demo:Basic] for a database or [willow2:Demo:Basic:Header1] for a report script.
Parameters:
names - - an array of component strings for the object id
Returns:
an Essbase object id

createObjectIDFromList

public static java.lang.String createObjectIDFromList(java.lang.String[] names,
                                                      boolean forObjectId)
Creates an essbase object identifier string for you; For example, [willow2:Demo:Basic] for a database or [willow2:Demo:Basic:Header1] for a report script.
Parameters:
names - an array of component strings for the object id
forObjectId - - true if for an object id false for use in a command source string
Returns:
objectId or command source string

createCommandSourceFromList

public static java.lang.String createCommandSourceFromList(java.lang.String[] names)
Create an string for use as a command source. Example for a database command is willow:Demo:Basic.
Parameters:
names -
Returns:
the command source strin

createCommandSourceFromObject

public static java.lang.String createCommandSourceFromObject(java.lang.Object object)
Parameters:
object -
Returns:

createObjectIDFromObject

public static java.lang.String createObjectIDFromObject(java.lang.Object object)
Parameters:
object -
Returns:
object id string

createObjectIDFromList

public static java.lang.String createObjectIDFromList(java.lang.Object object)
Return a string to be used as an object id
Parameters:
object -
Returns:
the object id string

createObjectIDFromList

public static java.lang.String createObjectIDFromList(java.lang.Object object,
                                                      boolean forObjectId)
Creates an essbase object identifier string for you by checking the object provided
Parameters:
object - -
forObjectId - - true for an object id false for a command source
Returns:
the object id or command source string

constructApplicationSource

public static java.lang.String constructApplicationSource(Application application)
return an string as a command source for an application
Parameters:
application -
Returns:
the application command source string

constructApplicationLabel

public static java.lang.String constructApplicationLabel(Application application)
Parameters:
application -
Returns:
the application label

constructApplicationLabel

public static java.lang.String constructApplicationLabel(Application application,
                                                         boolean forObjectId)
constructs a label for an application.
Parameters:
application -
forObjectId -
Returns:
the application label

constructDatabaseSource

public static java.lang.String constructDatabaseSource(Database db)
Parameters:
db -
Returns:
the database command source string

constructDatabaseLabel

public static java.lang.String constructDatabaseLabel(Database db)
Parameters:
db -
Returns:
the database label

constructDatabaseLabel

public static java.lang.String constructDatabaseLabel(Database db,
                                                      boolean forObjectId)
Parameters:
db -
forObjectId -
Returns:
the database label

constructDatabaseTitle

public static java.lang.String constructDatabaseTitle(java.lang.String[] pieces)
constructs a title for a database style window or dialog. This is in the form "Window Type: [server:application:database]"; i.e., "Database Properties: [LocalHost:Sample:Basic]". There must be 4 strings in the array passed in; if there aren't, the method will return the first string as the title. if there are 0 strings or the pieces parameter is null, the method will return an empty string.
Parameters:
pieces -
Returns:
the database title

constructDatabaseTitle

public static java.lang.String constructDatabaseTitle(java.lang.String base,
                                                      Database db)
constructs a title for a database style window or dialog. This is in the form "Window Type: [server:application:database]"; i.e., "Database Properties: [LocalHost:Sample:Basic]". If the method cannot construct the proper string for any reason it will return the base title passed in.
Parameters:
base -
db -
Returns:
the database title

constructObjectTitle

public static java.lang.String constructObjectTitle(java.util.ResourceBundle resource,
                                                    java.lang.String baseName,
                                                    Database db,
                                                    java.lang.String objectName)
constructs a name string for an Essbase object that resides in a database. The result is in the form [server:port.application.database.object]
Parameters:
resource -
baseName -
db -
objectName -
Returns:
the object title

constructObjectTitle

public static java.lang.String constructObjectTitle(java.util.ResourceBundle resource,
                                                    java.lang.String baseName,
                                                    Application app,
                                                    java.lang.String objectName)
Parameters:
resource -
baseName -
app -
objectName -
Returns:
the object title

constructObjectTitle

public static java.lang.String constructObjectTitle(java.util.ResourceBundle resource,
                                                    java.lang.String baseName,
                                                    java.lang.Object owner,
                                                    java.lang.String objectName)
Parameters:
resource -
baseName -
owner -
objectName -
Returns:
the object title

constructObjectSource

public static java.lang.String constructObjectSource(Database db,
                                                     java.lang.String objectName)
Parameters:
db -
objectName -
Returns:
a command source string

constructObjectLabel

public static java.lang.String constructObjectLabel(Database db,
                                                    java.lang.String objectName)
Parameters:
db -
objectName -
Returns:
an object label

constructObjectLabel

public static java.lang.String constructObjectLabel(Database db,
                                                    java.lang.String objectName,
                                                    boolean forObjectId)
constructs a name string for an Essbase object that resides in a database. The result is in the form [server:application:database:object]
Parameters:
db -
objectName -
forObjectId -
Returns:
the object label

constructObjectSource

public static java.lang.String constructObjectSource(Application app,
                                                     java.lang.String objectName)
Parameters:
app -
objectName -
Returns:
a command source string

constructObjectLabel

public static java.lang.String constructObjectLabel(Application app,
                                                    java.lang.String objectName)
Parameters:
app -
objectName -
Returns:
an object label

constructObjectLabel

public static java.lang.String constructObjectLabel(Application app,
                                                    java.lang.String objectName,
                                                    boolean forObjectId)
Parameters:
app -
objectName -
forObjectId -
Returns:
an object label

constructObjectSource

public static java.lang.String constructObjectSource(java.lang.Object owner,
                                                     java.lang.String objectName)
Parameters:
owner -
objectName -
Returns:
a command source string

constructObjectLabel

public static java.lang.String constructObjectLabel(java.lang.Object owner,
                                                    java.lang.String objectName)
Parameters:
owner -
objectName -
Returns:
an object label

constructObjectLabel

public static java.lang.String constructObjectLabel(java.lang.Object owner,
                                                    java.lang.String objectName,
                                                    boolean forObjectId)
Parameters:
owner -
objectName -
forObjectId -
Returns:
an object label

constructObjectSource

public static java.lang.String constructObjectSource(Group group)
Parameters:
group -
Returns:
a command source string

constructObjectLabel

public static java.lang.String constructObjectLabel(Group group)
Parameters:
group -
Returns:
an object label

constructObjectLabel

public static java.lang.String constructObjectLabel(Group group,
                                                    boolean forObjectId)
Parameters:
group -
forObjectId -
Returns:
an object label

constructObjectLabel

public static java.lang.String constructObjectLabel(User user)

constructObjectLabel

public static java.lang.String constructObjectLabel(User user,
                                                    boolean forObjectId)
Parameters:
user -
forObjectId -
Returns:
an object label

constructObjectSource

public static java.lang.String constructObjectSource(User user)

constructObjectSource

public static java.lang.String constructObjectSource(NamedObject nobj)
Parameters:
nobj -
Returns:
a command source string

constructObjectLabel

public static java.lang.String constructObjectLabel(NamedObject nobj)
Parameters:
nobj -
Returns:
the object label

constructObjectLabel

public static java.lang.String constructObjectLabel(NamedObject nobj,
                                                    boolean forObjectId)
Parameters:
nobj -
forObjectId -
Returns:
the object label

getName

public static java.lang.String getName(java.lang.Object obj)
This method is used to return the name of the object if defined.
Parameters:
object - whose name is to be determined
Returns:
the name

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.