## org.w3c.jigadmin
Class PropertyManager

    java.lang.Object
      |
      +--org.w3c.jigadmin.PropertyManager

public class PropertyManager
extends java.lang.Object

The PropertyManager

Field Summary
`protected java.util.Hashtable` `classProperties` The set of resource classes we know about.
`protected java.util.Properties` `frames` the hashtable of frames
`protected java.util.Properties` `iconProperties` the mapping of icon names to icon locations
`protected java.util.Properties` `indexers` the hashtable of indexers
`protected java.util.Hashtable` `mimeTypes` the hashtable of mime types
`static PropertyManager` `propertyManager`
`protected java.util.Properties` `resources` the hashtable of resources
`protected java.io.File` `root` The root for the property files.
`static java.lang.String` `ROOT_P`
`protected java.io.File` `zipfile`

Constructor Summary
`PropertyManager(java.io.File zipfile, java.io.File root)`

Method Summary
`protected int` `findResourceClassProperties(java.lang.String[] classes)`
`protected int` `findResourceClassProperties(java.lang.String[] classes, int offset)`
`java.util.Properties` `getAttributeProperties(RemoteResourceWrapper rrw, Attribute attr)` Get the properties for the attribute editor of a given remote resource.
`protected java.lang.String[]` `getClassHierarchy(RemoteResourceWrapper rrw)`
`protected java.util.Properties` `getDefaultAttributeProperties(java.lang.String clsname)`
`protected java.util.Properties` `getDefaultHelperProperties(java.lang.String clsname)`
`java.lang.String` `getEditorClass(RemoteResourceWrapper rrw)` Get any properties for the editor of the given remote resource instance.
`java.util.Properties` `getEditorProperties(RemoteResourceWrapper rrw)` Get any properties for the editor of the given remote resource instance.
`java.util.Hashtable` `getFrames()` get the hashtable of frames
`java.lang.String[]` `getHelperClasses(RemoteResourceWrapper rrw)` Get the list of helpers to be created for the given remote resource.
`java.util.Properties` `getHelperProperties(RemoteResourceWrapper rrw, java.lang.String helperClass)` Get the properties for the helper of a given remote resource.
`java.lang.String` `getIconLocation(java.lang.String name)` get the icon name resolved from its description
`java.util.Hashtable` `getIndexers()` get the hashtable of indexers
`java.util.Hashtable` `getMimeTypes()` get the hashtable of mimetypes
`static PropertyManager` `getPropertyManager()`
`protected org.w3c.jigadmin.ResourceClassProperties` `getResourceClassProperties(java.lang.String[] names)`
`protected org.w3c.jigadmin.ResourceClassProperties` `getResourceClassProperties(java.lang.String[] names, int from)` Get the best matching resource class properties for given class.
`java.util.Hashtable` `getResources()` get the hashtable of resources
`protected void` `initialize()` Load the properties from the root directory.
`boolean` `isEditable(RemoteResourceWrapper rrw)` Is the resource editable via JigAdmin?
`boolean` `isExtensible(RemoteResourceWrapper rrw)` Is the resource extensible?
`protected static java.util.Properties` `merge(java.util.Properties into, java.util.Properties source)`
`protected static java.util.Properties` `merge(java.util.Properties into, java.util.Properties source, boolean overide)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### root

    protected java.io.File root

  The root for the property files.

### zipfile

    protected java.io.File zipfile

### classProperties

    protected java.util.Hashtable classProperties

  The set of resource classes we know about. Maps class names to ResourceClassProperty

### iconProperties

    protected java.util.Properties iconProperties

  the mapping of icon names to icon locations

### mimeTypes

    protected java.util.Hashtable mimeTypes

  the hashtable of mime types

### resources

    protected java.util.Properties resources

  the hashtable of resources

### frames

    protected java.util.Properties frames

  the hashtable of frames

### indexers

    protected java.util.Properties indexers

  the hashtable of indexers

### ROOT_P

    public static java.lang.String ROOT_P

### propertyManager

    public static PropertyManager propertyManager

Constructor Detail

### PropertyManager

    public PropertyManager(java.io.File zipfile,
                           java.io.File root)

Method Detail

### merge

    protected static java.util.Properties merge(java.util.Properties into,
                                                java.util.Properties source,
                                                boolean overide)

### merge

    protected static java.util.Properties merge(java.util.Properties into,
                                                java.util.Properties source)

### initialize

    protected void initialize()

  Load the properties from the root directory.

### getResourceClassProperties

    protected org.w3c.jigadmin.ResourceClassProperties getResourceClassProperties(java.lang.String[] names,
                                                                                  int from)

  Get the best matching resource class properties for given class.
  Parameters:
    `classes` - The class names we're looking a macth for.
  Returns:
    A ResourceClassProperties instance.

### getResourceClassProperties

    protected org.w3c.jigadmin.ResourceClassProperties getResourceClassProperties(java.lang.String[] names)

### findResourceClassProperties

    protected int findResourceClassProperties(java.lang.String[] classes,
                                              int offset)

### findResourceClassProperties

    protected int findResourceClassProperties(java.lang.String[] classes)

### getClassHierarchy

    protected java.lang.String[] getClassHierarchy(RemoteResourceWrapper rrw)

### getDefaultHelperProperties

    protected java.util.Properties getDefaultHelperProperties(java.lang.String clsname)

### getDefaultAttributeProperties

    protected java.util.Properties getDefaultAttributeProperties(java.lang.String clsname)

### getEditorProperties

    public java.util.Properties getEditorProperties(RemoteResourceWrapper rrw)

  Get any properties for the editor of the given remote resource instance.
  Returns:
    A Properties instance.

### getEditorClass

    public java.lang.String getEditorClass(RemoteResourceWrapper rrw)

  Get any properties for the editor of the given remote resource instance.
  Returns:
    A Properties instance.

### isEditable

    public boolean isEditable(RemoteResourceWrapper rrw)

  Is the resource editable via JigAdmin?
  Parameters:
    `rrw` - the RemoteResourceWrapper
  Returns:
    true is the resoure is editable

### isExtensible

    public boolean isExtensible(RemoteResourceWrapper rrw)

  Is the resource extensible?
  Parameters:
    `rrw` - the RemoteResourceWrapper
  Returns:
    true is the resoure is extensible

### getHelperClasses

    public java.lang.String[] getHelperClasses(RemoteResourceWrapper rrw)

  Get the list of helpers to be created for the given remote resource.
  Returns:
    A set of helper class names (as an array).

### getHelperProperties

    public java.util.Properties getHelperProperties(RemoteResourceWrapper rrw,
                                                    java.lang.String helperClass)

  Get the properties for the helper of a given remote resource.
  Parameters:
    `rr` - The remote resource being edited.
    `helperClass` - Class of the helper about to be created.
  Returns:
    An instance of Properties.

### getAttributeProperties

    public java.util.Properties getAttributeProperties(RemoteResourceWrapper rrw,
                                                       Attribute attr)

  Get the properties for the attribute editor of a given remote resource.
  Parameters:
    `rr` - The remote resource being edited.
    `attr` - The attribute being edited.

### getIconLocation

    public java.lang.String getIconLocation(java.lang.String name)

  get the icon name resolved from its description
  Parameters:
    `name` - a String

### getMimeTypes

    public java.util.Hashtable getMimeTypes()

  get the hashtable of mimetypes

### getResources

    public java.util.Hashtable getResources()

  get the hashtable of resources

### getIndexers

    public java.util.Hashtable getIndexers()

  get the hashtable of indexers

### getFrames

    public java.util.Hashtable getFrames()

  get the hashtable of frames

### getPropertyManager

    public static PropertyManager getPropertyManager()