Java Doc for WizardHelpers.java in  » IDE-Netbeans » jmx » org » netbeans » modules » jmx » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » jmx » org.netbeans.modules.jmx 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.jmx.WizardHelpers

WizardHelpers
public class WizardHelpers (Code)
Helper class : all methods are static.




Method Summary
public static  StringcapitalizeFirstLetter(String name)
     Forces upper case for the first char of the given string.
public static  booleancheckFile(String name, String locationPath)
    
public static  booleancontainsString(Set set, String st)
     Returns if this string is already contained in the set.
public static  FileObjectcreateDir(String dirPath)
     Creates a directory if it doesn't already exist.
public static  FileObjectcreateFile(String filename, String path, String extension, String content)
     Creates a file.
public static  FileObjectcreateFile(String filename, FileObject folder, String extension, String content)
     Creates a file.
public static  voiddisplayMessage(String content, String messageTitle, int option, int typeMessage)
     Display a dialog with expected content.
public static  voiddisplayMessage(String content)
     Display a dialog with expected content.
public static  booleanfileExists(String name, String locationPath)
     Checks whether the given agent already exists or not at the given location ONLY.
public static  booleanfileExists(String fileName)
     Checks whether the given agent already exists or not at the given location ONLY.
static  StringfileToClassName(String fileName)
     Converts filename to the fully qualified name of the main class residing in the file.
For example: test/myapp/App.java --> test.myapp.App corresponding package name.
public static  StringforceFirstLetterLowerCase(String name)
     Forces lower case for the first char of the given string.
public static  StringgetClassName(String competeClassName)
    
public static  StringgetDefaultValue(String type)
    
public static  StringgetFileName(String completeFileName)
    
public static  StringgetFolderPath(String classFilePath)
     Returns the absolute path of the folder of the class file path.
public static  StringgetFullTypeName(String type)
     Returns the full type name of the type.
public static  StringgetFullTypeNameCode(String type)
     Returns the full type name code needed of the type.
public static  StringgetFullWrappedName(String type)
     Returns the full type name of the type.
public static  StringgetPackageName(Project project, FileObject packageFolder)
     Returns the corresponding package name of this folder.
public static  StringgetPackageName(Project project, String packagePath)
     Returns the corresponding package name of this folder path.
public static  StringgetPackageName(String className)
    
public static  ProjectgetProject(FileObject file)
    
public static  StringgetProjectLocation(WizardDescriptor wiz)
     Returns the project location of the given wiz.
public static  StringgetProjectName(WizardDescriptor wiz)
     Extracts the project name from the given wiz.
public static  SourceGroup[]getPropSourceGroups(Project project)
     Returns all source groups which contains properties files related to this project.
public static  String[]getSignature(String completeSignature)
     Returns an array of this method param types.
public static  StringgetSimpleName(String type)
    
public static  StringgetSimpleTypeName(String type)
    
public static  SourceGroup[]getSourceGroups(Project project)
     Returns all source groups which contains java files related to this project.
public static  MapgetSourcesToTestsMap(Project project, boolean sourceGroupsOnly)
     Builds a map that containing relation between SourceGroups and their respective test SourceGroups. Each entry of the map contains a SourceGroup as a key and an array of test SourceGroups returned by UnitTestForSourceQuery for that SourceGroup as a value.
public static  FileObject[]getTestsFileObject(SourceGroup sourceGroup, Project project)
    
public static  StringgetTypeObject(String type)
     Returns the equivalent object type of the type if it is primitive type else the same type.
public static  StringgetWrappedDefaultValue(String type)
    
public static  JComboBoxinstanciateAccessJComboBox()
    
public static  JTextFieldinstanciateJTextField()
    
public static  JComboBoxinstanciateRetTypeJComboBox()
    
public static  JComboBoxinstanciateTypeJComboBox()
    
public static  booleanisPrimitiveType(String type)
    
public static  booleanisStandardWrapperType(String type)
    
public static  booleanisValidClassName(String className)
     Checks if a name is a valid class name.
Parameters:
  className - String the class name to check.
public static  voidlogErrorMessage(String message, Exception ex)
     Logs an error message (used for debuging).Display a message in Netbeans log file with severity = EXCEPTION.
public static  voidlogInfoMessage(String message)
     Logs an info message (used for debuging).Display a message in Netbeans log file with severity = WARNING.
public static  booleanmbeanExists(String name, String locationPath)
     Checks whether the given mbean already exists or not at the given location ONLY.
public static  voidprintOperationExceptionModel(AbstractJMXTableModel model, int toParse)
     Prints out the content of parts of the operation exception table model(used to debug).
public static  booleanreadBoolOption(WizardDescriptor wiz, String prop)
    
public static  voidrefreshProjectTree(WizardDescriptor wiz)
    
public static  voidremoveFile(String name, String locationPath)
     Delete the file if already exists, else do nothing.
public static  StringreversePackageName(String packageName)
     Returns the reversed package name as DNS model.
public static  voidsave(DataObject dO)
    
public static  voidsetProjectValues(WizardDescriptor wiz)
     Extracts info from the netbeans project to put it into the wizard map.
public static  Object[]skipNulls(Object[] objs)
     Creates a copy of the given array, except that null objects are omitted. The length of the returned array is (l - n), where l is length of the passed array and n is number of null elements of the array.



Method Detail
capitalizeFirstLetter
public static String capitalizeFirstLetter(String name)(Code)
Forces upper case for the first char of the given string.
Parameters:
  name - String the text to force the first letter uppercase String name with its first letter upper case.



checkFile
public static boolean checkFile(String name, String locationPath)(Code)



containsString
public static boolean containsString(Set set, String st)(Code)
Returns if this string is already contained in the set. boolean false if this method is already contained in the set, else true.



createDir
public static FileObject createDir(String dirPath) throws IOException(Code)
Creates a directory if it doesn't already exist.
Parameters:
  dirPath - String folder path
throws:
  java.io.IOException - thrown by create file methods FileObject the created folder object



createFile
public static FileObject createFile(String filename, String path, String extension, String content) throws IOException(Code)
Creates a file.
Parameters:
  filename - Stringa file name
Parameters:
  path - String a folder path
Parameters:
  extension - String an file extension
Parameters:
  content - String expected file content
throws:
  java.io.IOException - thrown by create file method FileObject the created file.



createFile
public static FileObject createFile(String filename, FileObject folder, String extension, String content) throws IOException(Code)
Creates a file.
Parameters:
  filename - Stringa file name
Parameters:
  folder - FileObject a folder object
Parameters:
  extension - String an file extension
Parameters:
  content - String expected file content
throws:
  java.io.IOException - thrown by create file method FileObject the created file.



displayMessage
public static void displayMessage(String content, String messageTitle, int option, int typeMessage)(Code)
Display a dialog with expected content.
Parameters:
  content - String expected content of the displayed dialog
Parameters:
  messageTitle - String title of the dialog
Parameters:
  option - int option of the dialog
Parameters:
  typeMessage - int type of message



displayMessage
public static void displayMessage(String content)(Code)
Display a dialog with expected content.
Parameters:
  content - String expected content



fileExists
public static boolean fileExists(String name, String locationPath)(Code)
Checks whether the given agent already exists or not at the given location ONLY.
Parameters:
  name - String a file name
Parameters:
  locationPath - String a folder path boolean true if the corresponding file exists



fileExists
public static boolean fileExists(String fileName)(Code)
Checks whether the given agent already exists or not at the given location ONLY.
Parameters:
  fileName - String a file path boolean true if the corresponding file exists



fileToClassName
static String fileToClassName(String fileName)(Code)
Converts filename to the fully qualified name of the main class residing in the file.
For example: test/myapp/App.java --> test.myapp.App corresponding package name. Null if the input is notwell formed.
Parameters:
  fileName - String a file name



forceFirstLetterLowerCase
public static String forceFirstLetterLowerCase(String name)(Code)
Forces lower case for the first char of the given string.
Parameters:
  name - String the text to force the first letter lowercase String name with its first letter lower case.



getClassName
public static String getClassName(String competeClassName)(Code)
Returns the class name of the complete class name
Parameters:
  competeClassName - String a class name String a class name without package.



getDefaultValue
public static String getDefaultValue(String type)(Code)
Returns the default value of this type
Parameters:
  type - String a type name String code which returns the corresponding default value.



getFileName
public static String getFileName(String completeFileName)(Code)
Returns the file name of the complete file name with path
Parameters:
  completeFileName - String a file path String the file name with the extension.



getFolderPath
public static String getFolderPath(String classFilePath)(Code)
Returns the absolute path of the folder of the class file path. ex: getFolderPath("/home/toto/class.java") returns "/home/toto/".
Parameters:
  classFilePath - String class file path String class folder path.



getFullTypeName
public static String getFullTypeName(String type)(Code)
Returns the full type name of the type.
Parameters:
  type - String a type name String code to get full type name.



getFullTypeNameCode
public static String getFullTypeNameCode(String type)(Code)
Returns the full type name code needed of the type.
Parameters:
  type - String a type name String code to get full type name.



getFullWrappedName
public static String getFullWrappedName(String type)(Code)
Returns the full type name of the type.
Parameters:
  type - String a type name String code to get full type name.



getPackageName
public static String getPackageName(Project project, FileObject packageFolder)(Code)
Returns the corresponding package name of this folder.
Parameters:
  project - Project a project
Parameters:
  packageFolder - FileObject package folder String corresponding package name of this folder.



getPackageName
public static String getPackageName(Project project, String packagePath)(Code)
Returns the corresponding package name of this folder path.
Parameters:
  project - Project a project
Parameters:
  packagePath - String package folder path String corresponding package name of this folder path.



getPackageName
public static String getPackageName(String className)(Code)
Returns the package name of the complete class name
Parameters:
  className - String a class name String package name of this class.



getProject
public static Project getProject(FileObject file)(Code)



getProjectLocation
public static String getProjectLocation(WizardDescriptor wiz)(Code)
Returns the project location of the given wiz.
Parameters:
  wiz - WizardDescriptor String project location path



getProjectName
public static String getProjectName(WizardDescriptor wiz)(Code)
Extracts the project name from the given wiz.
Parameters:
  wiz - WizardDescriptor a wizard String a project name



getPropSourceGroups
public static SourceGroup[] getPropSourceGroups(Project project)(Code)
Returns all source groups which contains properties files related to this project.
Parameters:
  project - Project a project SourceGroup[] source groups which contains properties files.



getSignature
public static String[] getSignature(String completeSignature)(Code)
Returns an array of this method param types.
Parameters:
  completeSignature - String a method signature String[] an array of param types.



getSimpleName
public static String getSimpleName(String type)(Code)



getSimpleTypeName
public static String getSimpleTypeName(String type)(Code)



getSourceGroups
public static SourceGroup[] getSourceGroups(Project project)(Code)
Returns all source groups which contains java files related to this project.
Parameters:
  project - Project a project SourceGroup[] source groups which contains java files.



getSourcesToTestsMap
public static Map getSourcesToTestsMap(Project project, boolean sourceGroupsOnly)(Code)
Builds a map that containing relation between SourceGroups and their respective test SourceGroups. Each entry of the map contains a SourceGroup as a key and an array of test SourceGroups returned by UnitTestForSourceQuery for that SourceGroup as a value. SourceGroups that have no test SourceGroups assigned are omitted, i.e. the resulting map does not contain entries that would have empty arrays as their values.
Parameters:
  project - return only SourceGroups- ignore test folders not havinga corresponding SourceGroup
Parameters:
  sourceGroupsOnly - return only SourceGroups- ignore test folders not havinga corresponding SourceGroup created map - may be empty, may be unmodifiable,cannot be null



getTestsFileObject
public static FileObject[] getTestsFileObject(SourceGroup sourceGroup, Project project)(Code)



getTypeObject
public static String getTypeObject(String type)(Code)
Returns the equivalent object type of the type if it is primitive type else the same type.
Parameters:
  type - String a type name String an Object type (not primitive type).



getWrappedDefaultValue
public static String getWrappedDefaultValue(String type)(Code)
Returns the default value of this type
Parameters:
  type - String a type name String code which returns the corresponding default value.



instanciateAccessJComboBox
public static JComboBox instanciateAccessJComboBox()(Code)
Instanciates a JComboBox with the access types we provide (RO or R/W) JComboBox



instanciateJTextField
public static JTextField instanciateJTextField()(Code)
Instantiates a new JTextField JTextField



instanciateRetTypeJComboBox
public static JComboBox instanciateRetTypeJComboBox()(Code)
Instanciates a JComboBox with the return types we provide JComboBox



instanciateTypeJComboBox
public static JComboBox instanciateTypeJComboBox()(Code)
Instanciates a JComboBox with the variable types we provide JComboBox



isPrimitiveType
public static boolean isPrimitiveType(String type)(Code)
Returns true if this type is primitive, else returns false
Parameters:
  type - String a type name boolean true if it is a primitive type.



isStandardWrapperType
public static boolean isStandardWrapperType(String type)(Code)
Returns true if this type is primitive, else returns false
Parameters:
  type - String a type name boolean true if it is a primitive type.



isValidClassName
public static boolean isValidClassName(String className)(Code)
Checks if a name is a valid class name.
Parameters:
  className - String the class name to check. boolean true if className is a valid class name.



logErrorMessage
public static void logErrorMessage(String message, Exception ex)(Code)
Logs an error message (used for debuging).Display a message in Netbeans log file with severity = EXCEPTION.
Parameters:
  message - String message of this error
Parameters:
  ex - Exception an exception



logInfoMessage
public static void logInfoMessage(String message)(Code)
Logs an info message (used for debuging).Display a message in Netbeans log file with severity = WARNING.
Parameters:
  message - String message to log



mbeanExists
public static boolean mbeanExists(String name, String locationPath)(Code)
Checks whether the given mbean already exists or not at the given location ONLY.
Parameters:
  name - String a MBean name
Parameters:
  locationPath - String a folder path boolean true if corresponding MBean files exist



printOperationExceptionModel
public static void printOperationExceptionModel(AbstractJMXTableModel model, int toParse)(Code)
Prints out the content of parts of the operation exception table model(used to debug).
Parameters:
  model - AbstractJMXTableModel the model to parse
Parameters:
  toParse - int the parameter in the model to parse



readBoolOption
public static boolean readBoolOption(WizardDescriptor wiz, String prop)(Code)
Reads one boolean option from the wizard map
Parameters:
  wiz - WizardDescriptor
Parameters:
  prop - String the key of the property boolean the correponding boolean property.



refreshProjectTree
public static void refreshProjectTree(WizardDescriptor wiz) throws Exception(Code)
Refresh the project logical tree view
Parameters:
  wiz - WizardDescriptor
throws:
  java.lang.Exception - Exception



removeFile
public static void removeFile(String name, String locationPath)(Code)
Delete the file if already exists, else do nothing.
Parameters:
  name - String a file name
Parameters:
  locationPath - String a folder path



reversePackageName
public static String reversePackageName(String packageName)(Code)
Returns the reversed package name as DNS model.
Parameters:
  packageName - String a class name String reversed package name.



save
public static void save(DataObject dO) throws IOException(Code)



setProjectValues
public static void setProjectValues(WizardDescriptor wiz) throws Exception(Code)
Extracts info from the netbeans project to put it into the wizard map.
Parameters:
  wiz - WizardDescriptor the current wizard
throws:
  java.lang.Exception - if Project Location is null



skipNulls
public static Object[] skipNulls(Object[] objs)(Code)
Creates a copy of the given array, except that null objects are omitted. The length of the returned array is (l - n), where l is length of the passed array and n is number of null elements of the array. Order of non-null elements is kept in the returned array. The returned array is always a new array, even if the passed array does not contain any null elements.
Parameters:
  objs - array to copy array containing the same objects as the passed array, in thesame order, just with null elements missing



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.