Java Doc for PropertyUtils.java in  » IDE-Netbeans » project.ant » org » netbeans » spi » project » support » ant » 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 » project.ant » org.netbeans.spi.project.support.ant 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.spi.project.support.ant.PropertyUtils

PropertyUtils
public class PropertyUtils (Code)
Support for working with Ant properties and property files.
author:
   Jesse Glick




Method Summary
public static  PropertyProviderfixedPropertyProvider(Map<String, String> defs)
     Create a trivial property producer using only a fixed list of property definitions.
public static  EditablePropertiesgetGlobalProperties()
     Load global properties defined by the IDE in the user directory.
public static  StringgetUsablePropertyName(String name)
     Returns name usable as Ant property which is based on the given name.
public static synchronized  PropertyProviderglobalPropertyProvider()
     Create a property evaluator based on PropertyUtils.getGlobalProperties and PropertyUtils.putGlobalProperties .
public static  booleanisUsablePropertyName(String name)
     Checks whether the name is usable as Ant property name.
public static  PropertyProviderpropertiesFilePropertyProvider(File propertiesFile)
     Create a property provider based on a properties file. The file need not exist at the moment; if it is created or deleted an appropriate change will be fired.
public static  voidputGlobalProperties(EditableProperties properties)
     Edit global properties defined by the IDE in the user directory.
public static  StringrelativizeFile(File basedir, File file)
     Produce a machine-independent relativized version of a filename from a basedir. Unlike URI.relativize this will produce "../" sequences as needed.
Parameters:
  basedir - a directory to resolve relative to (need not exist on disk)
Parameters:
  file - a file or directory to find a relative path for a relativized path (slash-separated), or null if it is not possible (e.g.
public static  FileresolveFile(File basedir, String filename)
     Find an absolute file path from a possibly relative path.
static  FileObjectresolveFileObject(FileObject basedir, String filename)
    
static  StringresolvePath(File basedir, String path)
    
public static  PropertyEvaluatorsequentialPropertyEvaluator(PropertyProvider preprovider, PropertyProvider... providers)
     Create a property evaluator based on a series of definitions.

Each batch of definitions can refer to properties within itself (so long as there is no cycle) or any previous batch. However the special first provider cannot refer to properties within itself.

This implementation acquires ProjectManager.mutex for all operations, in read mode, and fires changes synchronously.

public static  String[]tokenizePath(String path)
     Split an Ant-style path specification into components.
static  FileuserBuildProperties()
     Location in user directory of per-user global properties.
public static  PropertyProvideruserPropertiesProvider(PropertyEvaluator findUserPropertiesFile, String propertyName, File basedir)
     Creates a property provider similar to PropertyUtils.globalPropertyProvider but which can use a different global properties file.



Method Detail
fixedPropertyProvider
public static PropertyProvider fixedPropertyProvider(Map<String, String> defs)(Code)
Create a trivial property producer using only a fixed list of property definitions. Its values are constant, and it never fires changes.
Parameters:
  defs - a map from property names to values (it is illegal to modify this mapafter passing it to this method) a matching property producer



getGlobalProperties
public static EditableProperties getGlobalProperties()(Code)
Load global properties defined by the IDE in the user directory. Currently loads ${netbeans.user}/build.properties if it exists.

Acquires read access.

To listen to changes use PropertyUtils.globalPropertyProvider . user properties (empty if missing or malformed)




getUsablePropertyName
public static String getUsablePropertyName(String name)(Code)
Returns name usable as Ant property which is based on the given name. All forbidden characters are either removed or replaced with suitable ones.
Parameters:
  name - name to use as base for Ant property name name usable as Ant property name



globalPropertyProvider
public static synchronized PropertyProvider globalPropertyProvider()(Code)
Create a property evaluator based on PropertyUtils.getGlobalProperties and PropertyUtils.putGlobalProperties . It will supply global properties and fire changes when this file is changed. a property producer



isUsablePropertyName
public static boolean isUsablePropertyName(String name)(Code)
Checks whether the name is usable as Ant property name.
Parameters:
  name - name to check for usability as Ant property true if name is usable otherwise false



propertiesFilePropertyProvider
public static PropertyProvider propertiesFilePropertyProvider(File propertiesFile)(Code)
Create a property provider based on a properties file. The file need not exist at the moment; if it is created or deleted an appropriate change will be fired. If its contents are changed on disk a change will also be fired.
Parameters:
  propertiesFile - a path to a (possibly nonexistent) *.properties file a supplier of properties from such a file
See Also:   Properties.load



putGlobalProperties
public static void putGlobalProperties(EditableProperties properties) throws IOException(Code)
Edit global properties defined by the IDE in the user directory.

Acquires write access.
Parameters:
  properties - user properties to set
throws:
  IOException - if they could not be stored
See Also:   PropertyUtils.getGlobalProperties




relativizeFile
public static String relativizeFile(File basedir, File file)(Code)
Produce a machine-independent relativized version of a filename from a basedir. Unlike URI.relativize this will produce "../" sequences as needed.
Parameters:
  basedir - a directory to resolve relative to (need not exist on disk)
Parameters:
  file - a file or directory to find a relative path for a relativized path (slash-separated), or null if it is not possible (e.g. different DOS drives);just . in case the paths are the same
throws:
  IllegalArgumentException - if the basedir is known to be a file and not a directory



resolveFile
public static File resolveFile(File basedir, String filename) throws IllegalArgumentException(Code)
Find an absolute file path from a possibly relative path.
Parameters:
  basedir - base file for relative filename resolving; must be an absolute path
Parameters:
  filename - a pathname which may be relative or absolute and mayuse / or \ as the path separator an absolute file corresponding to it
throws:
  IllegalArgumentException - if basedir is not absolute



resolveFileObject
static FileObject resolveFileObject(FileObject basedir, String filename)(Code)



resolvePath
static String resolvePath(File basedir, String path)(Code)



sequentialPropertyEvaluator
public static PropertyEvaluator sequentialPropertyEvaluator(PropertyProvider preprovider, PropertyProvider... providers)(Code)
Create a property evaluator based on a series of definitions.

Each batch of definitions can refer to properties within itself (so long as there is no cycle) or any previous batch. However the special first provider cannot refer to properties within itself.

This implementation acquires ProjectManager.mutex for all operations, in read mode, and fires changes synchronously. It also expects changes to be fired from property providers in read (or write) access.


Parameters:
  preprovider - an initial context (may be null)
Parameters:
  providers - a sequential list of property groups an evaluator



tokenizePath
public static String[] tokenizePath(String path)(Code)
Split an Ant-style path specification into components. Tokenizes on : and ;, paying attention to DOS-style components such as C:\FOO. Also removes any empty components.
Parameters:
  path - an Ant-style path (elements arbitrary) using DOS or Unix separators a tokenization of that path into components



userBuildProperties
static File userBuildProperties()(Code)
Location in user directory of per-user global properties. May be null if netbeans.user is not set.



userPropertiesProvider
public static PropertyProvider userPropertiesProvider(PropertyEvaluator findUserPropertiesFile, String propertyName, File basedir)(Code)
Creates a property provider similar to PropertyUtils.globalPropertyProvider but which can use a different global properties file. If a specific file is pointed to, that is loaded; otherwise behaves like PropertyUtils.globalPropertyProvider . Permits behavior similar to command-line Ant where not erroneous, but using the IDE's default global properties for projects which do not yet have this property registered.
Parameters:
  findUserPropertiesFile - an evaluator in which to look up propertyName
Parameters:
  propertyName - a property pointing to the global properties file (typically "user.properties.file")
Parameters:
  basedir - a base directory to use when resolving the path to the global properties file, if relative a provider of global properties
since:
   org.netbeans.modules.project.ant/1 1.14



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.