home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
Attributes.java
< prev
next >
Wrap
Text File
|
1998-10-25
|
4KB
|
100 lines
/*
* Copyright 1998 Symantec Corporation, All Rights Reserved.
*/
package com.symantec.itools.vcafe.openapi;
/**
* An api that stores named arbitrary data in either a <code>VisualProject</code> or global to the
* Visual Cafe environment. The data can be persistent between sessions, or temporary.
* @see VisualCafe#getAttributes
* @see VisualProject#getAttributes
*
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public interface Attributes
{
/**
* Sets the value of a session-duration attribute. Once a value has been set, the Object's
* data cannot be changed without being re-set.
* The attribute/value persists only for the duration of the session.
* @param owner The Class that conceptually owns this attribute/value <B>(can be <code>null</code>)</B>.
* @param attributeName The locale-independent name of the attribute.
* @param value The value.
* @see getSessionAttributeValue
* @see setPersistentAttributeValue
*/
void setSessionAttributeValue(Class owner, String attributeName, Object value);
/**
* Sets the value of a persistent attribute. Once a value has been set, the Object's
* data cannot be changed without being re-set.
* The attribute/value is saved and restored between sessions.
*
* @param owner The Class that conceptually owns this attribute/value <B>(cannot be <code>null</code>)</B>.
* @param attributeName The locale-independent name of the attribute.
* @param value The value.
* @exception InvalidPersistentAttributeException If the value can't be properly streamed in or out.
* @see getPersistentAttributeValue
* @see setSessionAttributeValue
*/
void setPersistentAttributeValue(Class owner, String attributeName, java.io.Serializable value) throws InvalidPersistentAttributeException;
/**
* Retrieve the value of a session-duration attribute.
* @param owner The Class that conceptually owns this attribute/value <B>(can be <code>null</code>)</B>.
* @param attributeName The locale-independent name of the attribute.
* @return The value of the attribute, or <code>null</code> if the attribute is unknown.
* @see setSessionAttributeValue
* @see getPersistentAttributeValue
*/
Object getSessionAttributeValue(Class owner, String attributeName);
/**
* Retrieve a named attribute from the list of persistent attributes.
* @param owner The class that conceptually owns this attribute/value <B>(cannot be <code>null</code>)</B>.
* @param attributeName The locale-independent name of the attribute
* @return The value of the attribute, or <code>null</code> if the attribute is unknown.
* @exception InvalidPersistentAttributeException If the value can't be properly streamed in or out.
* @see setPersistentAttributeValue
* @see getSessionAttributeValue
*/
Object getPersistentAttributeValue(Class owner, String attributeName) throws InvalidPersistentAttributeException;
/**
* Determine if an attribute is persistent.
* @param owner The class that conceptually owns the attribute/value.
* @param attributeName The locale-independent name of the attribute.
* @return <code>true</code> if the attribute is persistent, <code>false</code> otherwise.
*/
boolean isAttributePersistent(Class owner, String attributeName);
/**
* Gets an enumeration used to cycle through the names of all attributes.
* The names are returned as String objects, formatted as owner.getName() + "#" + attributeName.
* If a session attribute was set without an owner, the attributeName is returned.
* @return An enumeration of the locale-independent names of all attributes that have
* been registered.
* @see setSessionAttributeValue
* @see setPersistentAttributeValue
*/
java.util.Enumeration attributeNames();
/**
* Gets an enumeration used to cycle through the names of all attributes that
* belong to the specified owner.
* The names are returned as String objects set to the attributeName.
* @param owner The Class that was specified when the attribute value was set.
* @return An enumeration of the locale-independent names of all attributes that have
* been registered with the given owner.
* @see setSessionAttributeValue
* @see setPersistentAttributeValue
*/
java.util.Enumeration attributeNames(Class owner);
}