com.sage.accpac.sm
Class PropertyBag

java.lang.Object
  extended by com.sage.accpac.sm.PropertyBag
All Implemented Interfaces:
IPropertyBag

@ThreadSafe
public class PropertyBag
extends java.lang.Object
implements IPropertyBag

Provides access to a persisted property bag shared over the whole system.
A property bag is a collection of named properties of the given program and all similar programs. Changes are observed between all such programs and are persisted even when there are no such programs.
Two programs are similar if they have the same

The easiest way to create a PropertyBag object is by calling one of the Program's getPropertyBag methods. Alternatively you can create a new PropertyBag by specifying the Program to one of the constructors.

See Also:
PropertyBag(Program), PropertyBag(Program,String), the program class, the property class
Thread safety
Not thread-safe

Constructor Summary
PropertyBag(Program program)
          Construct a PropertyBag for the default menuid of the given program.
PropertyBag(Program program, java.lang.String menuID)
          Construct a PropertyBag for the given menuid of the given program.
 
Method Summary
 void clear()
          Clears out the whole bag.
 Property getProperty(java.lang.String name)
          Gets a new Property object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyBag

public PropertyBag(Program program)
Construct a PropertyBag for the default menuid of the given program.
This is equivalent to calling the constructor giving a blank menuid.

Parameters:
program - see the more extensive constructor.
See Also:
the more extensive constructor.

PropertyBag

public PropertyBag(Program program,
                   java.lang.String menuID)
Construct a PropertyBag for the given menuid of the given program.

Parameters:
program - the Program object through which the properties are accessed. The properties are shared amongst all Programs in the system using the same user id, company id, application id, application version and application object id.
menuID - the menu ID of the particular property bag requested. If this is a null reference or a string of length zero then the inherited property bag will be selected.
Method Detail

clear

public void clear()
Clears out the whole bag.

Specified by:
clear in interface IPropertyBag

getProperty

public Property getProperty(java.lang.String name)
Gets a new Property object.

Specified by:
getProperty in interface IPropertyBag
Parameters:
name - the name of the property
Returns:
the Property with the given name in this bag


Copyright © 2011 Sage Software, Inc. All rights reserved.