Java Doc for DesignProject.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » rave » designtime » 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 » visualweb.api.designer » com.sun.rave.designtime 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.rave.designtime.DesignProject

DesignProject
public interface DesignProject extends DisplayItem(Code)

A DesignProject is a top-level container for DesignContexts at design-time. The DesignProject represents the project in the Creator IDE. Not much can be done with Projects in the Creator Design-Time API, except for accessing other DesignContexts, listening to project-level events, and storing project-level data.

IMPLEMENTED BY CREATOR - This interface is implemented by Creator for use by the component (bean) author.


author:
   Joe Nuxoll
version:
   1.0
See Also:   DesignContext.getProject




Method Summary
public  voidaddDesignProjectListener(DesignProjectListener listener)
    
public  URIaddResource(URL sourceUrl, URI targetUri)
     Copies a resource into this project, and converts the external URL into a local URI (resource identifier string).
public  DesignContextcreateDesignContext(String className, Class baseClass, Map contextData)
     Creates a new DesignContext (backing file) in this project.
public  DesignContext[]getDesignContexts()
     Returns all the DesignContexts in this project.
public  DesignProjectListener[]getDesignProjectListeners()
    
public  ObjectgetGlobalData(String key)
    

Retrieves the value for a global name-value pair of data.

public  ObjectgetProjectData(String key)
    

Retrieves the value for a name-value pair of data on this DesignProject.

public  FilegetResourceFile(URI resourceUri)
     Returns a File object containing the specified resource.
public  URI[]getResources(URI rootPath, boolean recurseFolders)
    

Returns the set of project root relative resources in this project as an array of local resource identifiers.

public  booleanremoveDesignContext(DesignContext context)
     Removes an existing DesignContext (backing file) from this project.
public  voidremoveDesignProjectListener(DesignProjectListener listener)
    
public  booleanremoveResource(URI resourceUri)
     Removes a resource from the project directory.
public  voidsetGlobalData(String key, Object data)
    

Sets a global name-value pair of data.

public  voidsetProjectData(String key, Object data)
    

Sets a name-value pair of data on this DesignProject.




Method Detail
addDesignProjectListener
public void addDesignProjectListener(DesignProjectListener listener)(Code)
Adds a listener to this DesignProject
Parameters:
  listener - The desired listener to add



addResource
public URI addResource(URL sourceUrl, URI targetUri) throws IOException(Code)
Copies a resource into this project, and converts the external URL into a local URI (resource identifier string).
Parameters:
  sourceUrl - A URL pointing to the desired external resource
Parameters:
  targetUri - The desired resource URI (path) within the project directory The resulting project relative resource uri (resourceUri)
throws:
  IOException - if the resource cannot be copied



createDesignContext
public DesignContext createDesignContext(String className, Class baseClass, Map contextData)(Code)
Creates a new DesignContext (backing file) in this project.
Parameters:
  className - The desired fully-qualified class name for the file
Parameters:
  baseClass - The desired base class for the file
Parameters:
  contextData - A Map of context data to apply to the newly created context file The newly created DesignContext, or null if the operation was unsuccessful



getDesignContexts
public DesignContext[] getDesignContexts()(Code)
Returns all the DesignContexts in this project. There will be one DesignContext for each designable file in the project. Note that for JSF, this means one DesignContext for each combination of "PageX.java" and "PageX.jsp" file, as well as one for each of the non-page beans, like "SessionBeanX.java", "ApplicationBeanX.java", etc. An array of DesignContext objects - one for each designable file in the project



getDesignProjectListeners
public DesignProjectListener[] getDesignProjectListeners()(Code)
Returns the array of current listeners to this DesignProject An array of listeners currently listening to this DesignProject



getGlobalData
public Object getGlobalData(String key)(Code)

Retrieves the value for a global name-value pair of data. This name-value pair will be stored in the associated user settings file (as text), so this data is retrievable in any IDE session once it has been set.

NOTE: The 'data' Object can be a simple String or a complex (non-String) Object. Either way, it will be stored as text in IDE state and will be associated with this IDE. When the IDE state is written to disk, any complex (non-String) objects will be converted to String using the 'toString()' method. If a component author wishes to store a complex (non-String) object, they must be sure to override the 'toString()' method on their object to serialize out enough information to be able to restore the object when a subsequent call to 'getGlobalData' returns a String. Though a complex object was stored via the 'setGlobalData' method, a component author *may* get back a String from 'getGlobalData' if the IDE has been closed and reopened since the previous call to 'setGlobalData'. It is the responsibility of the component author to reconstruct the complex object from the String, and if desired, put it back into the context using the 'setGlobalData' method passing the newly constructed object in. This way, all subsequent calls to 'getGlobalData' with that key will return the complex object instance - until the IDE is closed and restored.


Parameters:
  key - The desired String key to retrieve the data object for The data object that is currently stored under this key - this may be a String oran Object, based on what was stored using 'setGlobalData'. NOTE: This will alwaysbe a String after the project file is read from disk, even if the stored object wasnot a String - it will have been converted using the 'toString()' method.
See Also:   DesignProject.setGlobalData(StringObject)DesignIde.setIdeData(StringObject)



getProjectData
public Object getProjectData(String key)(Code)

Retrieves the value for a name-value pair of data on this DesignProject. This name-value pair is stored in the project file, so this data is retrievable in any IDE session once it has been set. Some custom pre-defined keys can be found in Constants.ProjectData .

NOTE: The 'data' Object can be a simple String or a complex (non-String) Object. Either way, it will be stored as text in the project file and will be associated with this project. When the project file is written to disk, any complex (non-String) objects will be converted to String using the 'toString()' method. If a component author wishes to store a complex (non-String) object, they must be sure to override the 'toString()' method on their object to serialize out enough information to be able to restore the object when a subsequent call to 'getProjectData' returns a String. Though a complex object was stored via the 'setProjectData' method, a component author *may* get back a String from 'getProjectData' if the project has been saved and reopened since the previous call to 'setProjectData'. It is the responsibility of the component author to reconstruct the complex object from the String, and if desired, put it back into the context using the 'setProjectData' method passing the newly constructed object in. This way, all subsequent calls to 'getProjectData' with that key will return the complex object instance - until the project is closed and restored.


Parameters:
  key - The desired String key to retrieve the data object for The data object that is currently stored under this key - this may be a String oran Object, based on what was stored using 'setProjectData'. NOTE: This will alwaysbe a String after the project file is read from disk, even if the stored object wasnot a String - it will have been converted using the 'toString()' method.
See Also:   DesignProject.setProjectData(String,Object)
See Also:   Constants.ProjectData



getResourceFile
public File getResourceFile(URI resourceUri)(Code)
Returns a File object containing the specified resource.
Parameters:
  resourceUri - The desired project relative resource uri to fetch a file object A File object containing the project resource



getResources
public URI[] getResources(URI rootPath, boolean recurseFolders)(Code)

Returns the set of project root relative resources in this project as an array of local resource identifiers. The returned URIs will always be paths from the project root, including folder hiearchy within the project. The specified rootPath is used as a filter, to allow drilling-in to directories as desired. Use URI.relativize() to make relative URIs when needed. Use getResourceFile(URI) to retrieve a File object for a particular resource in the project.


Parameters:
  rootPath - The root path to fetch resources underneath. Passing null willstart at the root of the project.
Parameters:
  recurseFolders - true to include the sub-resources inside of any folders A project root relative array of URIs representing all the resource files under thespecified root path



removeDesignContext
public boolean removeDesignContext(DesignContext context)(Code)
Removes an existing DesignContext (backing file) from this project.
Parameters:
  context - The desired DesignContext to remove from the project true if the operation was successful, false if not



removeDesignProjectListener
public void removeDesignProjectListener(DesignProjectListener listener)(Code)
Removes a listener from this DesignProject
Parameters:
  listener - The desired listener to remove



removeResource
public boolean removeResource(URI resourceUri)(Code)
Removes a resource from the project directory.
Parameters:
  resourceUri - The desired resource to remove from the project boolean true if the resource was successfully removed,false if not



setGlobalData
public void setGlobalData(String key, Object data)(Code)

Sets a global name-value pair of data. This name-value pair will be stored in the associated user settings file (as text), so this data is retrievable in a future IDE session.

NOTE: The 'data' Object can be a simple String or a complex (non-String) Object. Either way, it will be stored as text in IDE state and will be associated with this IDE. When the IDE state is written to disk, any complex (non-String) objects will be converted to String using the 'toString()' method. If a component author wishes to store a complex (non-String) object, they must be sure to override the 'toString()' method on their object to serialize out enough information to be able to restore the object when a subsequent call to 'getGlobalData' returns a String. Though a complex object was stored via the 'setGlobalData' method, a component author *may* get back a String from 'getGlobalData' if the IDE has been closed and reopened since the previous call to 'setGlobalData'. It is the responsibility of the component author to reconstruct the complex object from the String, and if desired, put it back into the context using the 'setGlobalData' method passing the newly constructed object in. This way, all subsequent calls to 'getGlobalData' with that key will return the complex object instance - until the IDE is closed and restored.


Parameters:
  key - The String key to store the data object under
Parameters:
  data - The data object to store - this may be a String or any complex object, but itwill be stored as a string using the 'toString()' method when the project file iswritten to disk.
See Also:   DesignProject.getGlobalData(String)DesignIde.getIdeData(String)



setProjectData
public void setProjectData(String key, Object data)(Code)

Sets a name-value pair of data on this DesignProject. This name-value pair will be stored in the associated project file, so this data is retrievable in a future IDE session.

NOTE: The 'data' Object can be a simple String or a complex (non-String) Object. Either way, it will be stored as text in the project file and will be associated with this project. When the project file is written to disk, any complex (non-String) objects will be converted to String using the 'toString()' method. If a component author wishes to store a complex (non-String) object, they must be sure to override the 'toString()' method on their object to serialize out enough information to be able to restore the object when a subsequent call to 'getProjectData' returns a String. Though a complex object was stored via the 'setProjectData' method, a component author *may* get back a String from 'getProjectData' if the project has been saved and reopened since the previous call to 'setProjectData'. It is the responsibility of the component author to reconstruct the complex object from the String, and if desired, put it back into the context using the 'setProjectData' method passing the newly constructed object in. This way, all subsequent calls to 'getProjectData' with that key will return the complex object instance - until the project is closed and restored.


Parameters:
  key - The String key to store the data object under
Parameters:
  data - The data object to store - this may be a String or any complex object, but itwill be stored as a string using the 'toString()' method when the project file iswritten to disk.
See Also:   DesignProject.getProjectData(String)



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