org.eclipse.wst.jsdt.js.bower.util

## Class BowerUtil

- java.lang.Object
- - org.eclipse.wst.jsdt.js.bower.util.BowerUtil

    public final class BowerUtil
    extends java.lang.Object

### Method Summary

All Methods Static Methods Concrete Methods
`static java.lang.String` `generateJson(BowerJson bowerJson)`
`static IFile` `getBowerrc(IProject project)` .bowerrc is an optional file for bower configuration.
`static IPath` `getBowerWorkingDir(IProject project, java.lang.String... ignores)`
`static java.lang.String` `getDirectoryName(IFile bowerrc)`
`static boolean` `hasBowerJson(IFolder folder)`
`static boolean` `isBowerJson(IResource resource)`
`static boolean` `isBowerJsonExist(IProject project)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### isBowerJsonExist

    public static boolean isBowerJsonExist(IProject project)
                                    throws CoreException

Throws:
  `CoreException`

#### hasBowerJson

    public static boolean hasBowerJson(IFolder folder)
                                throws CoreException

Throws:
  `CoreException`

#### isBowerJson

    public static boolean isBowerJson(IResource resource)

#### generateJson

    public static java.lang.String generateJson(BowerJson bowerJson)

#### getBowerrc

    public static IFile getBowerrc(IProject project)
                            throws CoreException

.bowerrc is an optional file for bower configuration. The "directory" property defines the path in which installed components should be saved. If not specified the default "bower_components" folder will be used.

Throws:
  `CoreException`
See Also:
  .bowerrc specification

#### getBowerWorkingDir

    public static IPath getBowerWorkingDir(IProject project,
                                           java.lang.String... ignores)
                                    throws CoreException

Returns:
  path to directory in which native bower call must be performed. Basically, the method scans project for bower.json file and returns it's parent, ignoring components directories i.e "bower_components" or defined in .bowerrc file
Throws:
  `CoreException`

#### getDirectoryName

    public static java.lang.String getDirectoryName(IFile bowerrc)
                                             throws java.io.UnsupportedEncodingException,
                                                    CoreException

Returns:
  name of the directory in which bower components would be unpacked according to the .bowerrc
Throws:
  `CoreException`
  `java.io.UnsupportedEncodingException`
See Also:
  Directory property