com.ibm.itim.adhocreport.util
Class Helper

java.lang.Object
  |
  +--com.ibm.itim.adhocreport.util.Helper

public class Helper
extends java.lang.Object


Constructor Summary
Helper()
           
 
Method Summary
static boolean customClassToBeStaged(java.lang.String entity)
           
static boolean enforceACIs()
           
static java.util.Collection getAllowedAttributes()
          Return the allowed attributes strings in lower case.
static int getChangeNumber(java.sql.Connection connection)
          This method returns the changeNumber of the last processed changelog entry.
static java.lang.String getCrystalTemplateDir()
          This method returns the directory where templates for cystal reports will be saved Assumption is that the directory sturcture \data\adhocreport\crystal is present
static java.sql.Connection getDBConnection()
          This method returns the ITIM database connection.
static javax.naming.directory.DirContext getDirContext()
          This method returns the ITIM directory server JNDI context.
static java.util.HashMap getDomainAdmins(java.util.Collection containers)
           
static int getFinalChangeNumber(java.lang.String changelogBaseDN, int startChangeNumber)
          This method returns the changeNumber of the last changelog entry that will be processed.
static java.lang.String getLogoDir()
          This method returns the directory where logo file is saved Assumption is that the directory sturcture \data\adhocreport\logo is present
static java.lang.String getStyleSheetDir(java.util.Locale locale)
          This method returns the directory where stylesheets for adhoc reports are saved Assumption is that the directory sturcture \data\adhocreport\xsl is present
static java.util.HashMap getSupervisors(java.util.Collection containers)
           
static java.lang.String getTemporaryCrystalTemplateDir()
          This method returns the temporary directory where templates for cystal reports will be saved temporarily.
static java.lang.String replaceString(java.lang.String aInput, java.lang.String aOldPattern, java.lang.String aNewPattern)
           
static void setChangeNumber(int changeNumber, java.sql.Connection connection)
          This method sets the changeNumber of the last processed changelog entry in the database (CHANGELOG table).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Helper

public Helper()
Method Detail

getChangeNumber

public static int getChangeNumber(java.sql.Connection connection)
                           throws java.lang.ClassNotFoundException,
                                  java.sql.SQLException,
                                  java.lang.InstantiationException,
                                  java.lang.IllegalAccessException,
                                  java.io.IOException
This method returns the changeNumber of the last processed changelog entry.
Returns:
int
Throws:
java.lang.ClassNotFoundException -  
java.sql.SQLException -  
java.lang.InstantiationException -  
java.lang.IllegalAccessException -  
java.io.IOException -  

setChangeNumber

public static void setChangeNumber(int changeNumber,
                                   java.sql.Connection connection)
                            throws java.lang.ClassNotFoundException,
                                   java.sql.SQLException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException,
                                   java.io.IOException
This method sets the changeNumber of the last processed changelog entry in the database (CHANGELOG table).
Parameters:
changeNumber -  
Throws:
java.lang.ClassNotFoundException -  
java.sql.SQLException -  
java.lang.InstantiationException -  
java.lang.IllegalAccessException -  
java.io.IOException -  

getDBConnection

public static java.sql.Connection getDBConnection()
                                           throws java.lang.ClassNotFoundException,
                                                  java.lang.InstantiationException,
                                                  java.sql.SQLException,
                                                  java.lang.IllegalAccessException,
                                                  java.io.IOException
This method returns the ITIM database connection.
Returns:
Connection to ITIM database.
Throws:
java.lang.ClassNotFoundException -  
java.lang.InstantiationException -  
java.sql.SQLException -  
java.lang.IllegalAccessException -  
java.io.IOException -  

getFinalChangeNumber

public static int getFinalChangeNumber(java.lang.String changelogBaseDN,
                                       int startChangeNumber)
                                throws javax.naming.NamingException,
                                       java.io.IOException
This method returns the changeNumber of the last changelog entry that will be processed.
Returns:
int giving the changeNumber of the final changelog entry to be processed.
Throws:
javax.naming.NamingException -  
java.io.IOException -  

getDirContext

public static javax.naming.directory.DirContext getDirContext()
                                                       throws javax.naming.NamingException,
                                                              java.io.IOException
This method returns the ITIM directory server JNDI context.
Returns:
DirContext to the ITIM directory server.
Throws:
javax.naming.NamingException -  
java.io.IOException -  

getCrystalTemplateDir

public static java.lang.String getCrystalTemplateDir()
                                              throws javax.naming.NamingException,
                                                     java.io.IOException
This method returns the directory where templates for cystal reports will be saved Assumption is that the directory sturcture \data\adhocreport\crystal is present
Returns:
String for path of the directory
Throws:
javax.naming.NamingException -  
java.io.IOException -  

getTemporaryCrystalTemplateDir

public static java.lang.String getTemporaryCrystalTemplateDir()
                                                       throws javax.naming.NamingException,
                                                              java.io.IOException
This method returns the temporary directory where templates for cystal reports will be saved temporarily. The template files are saved here temporarily before modifying the template while importing it in ITIM server Assumption is that the directory sturcture \data\adhocreport\crystal is present
Returns:
String for path of the directory
Throws:
javax.naming.NamingException -  
java.io.IOException -  

getStyleSheetDir

public static java.lang.String getStyleSheetDir(java.util.Locale locale)
                                         throws javax.naming.NamingException,
                                                java.io.IOException
This method returns the directory where stylesheets for adhoc reports are saved Assumption is that the directory sturcture \data\adhocreport\xsl is present
Returns:
String for path of the directory
Throws:
javax.naming.NamingException -  
java.io.IOException -  

getLogoDir

public static java.lang.String getLogoDir()
                                   throws javax.naming.NamingException,
                                          java.io.IOException
This method returns the directory where logo file is saved Assumption is that the directory sturcture \data\adhocreport\logo is present
Returns:
String for path of the directory
Throws:
javax.naming.NamingException -  
java.io.IOException -  

enforceACIs

public static boolean enforceACIs()

customClassToBeStaged

public static boolean customClassToBeStaged(java.lang.String entity)

getSupervisors

public static java.util.HashMap getSupervisors(java.util.Collection containers)
                                        throws ModelCommunicationException,
                                               ObjectNotFoundException,
                                               java.lang.InstantiationException,
                                               LdapException

getDomainAdmins

public static java.util.HashMap getDomainAdmins(java.util.Collection containers)
                                         throws ModelCommunicationException,
                                                ObjectNotFoundException,
                                                java.lang.InstantiationException,
                                                LdapException

replaceString

public static java.lang.String replaceString(java.lang.String aInput,
                                             java.lang.String aOldPattern,
                                             java.lang.String aNewPattern)

getAllowedAttributes

public static java.util.Collection getAllowedAttributes()
Return the allowed attributes strings in lower case. Note: Lower case to be done from the retunr value