BEA Systems, Inc.

BEA WebLogic Server 9.1 API Reference


weblogic.security.spi
Interface Resource

All Superinterfaces:
Serializable
All Known Subinterfaces:
SelfDescribingResource, SelfDescribingResourceV2
All Known Implementing Classes:
ResourceBase

public interface Resource
extends Serializable

The Resource interface provides the definition for an object that represents a resource that may be protected from unauthorized access.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Method Summary
 boolean equals(Object another)
          Compares this resource to the resource in the specified object.
 long getID()
          Gets a 64-bit hashcode for a resource.
 String[] getKeys()
          Gets keys for the resource.
 Resource getParentResource()
          Gets a Resource object that represents the parent of the current resource.
 String getType()
          Gets the type of this resource.
 String[] getValues()
          Gets the values corresponding to the keys of this resource's type.
 int hashCode()
          Returns an identifier for the resource as a hash code.
 String toString()
          Returns a string representation of this resource.
 

Method Detail

equals

public boolean equals(Object another)
Compares this resource to the resource in the specified object.

Parameters:
another - another resource with which to compare this resource.

Returns:
a boolean value indicating whether the resource passed in is the same as that encapsulated by this resource. A value of TRUE indicates that the resource passed in is the same as that encapsulated by this resource; a value of FALSE indicates that it is not the same.


getID

public long getID()
Gets a 64-bit hashcode for a resource.

Returns:
the ID value for the resource, represented as a long.


getKeys

public String[] getKeys()
Gets keys for the resource.

Returns:
an array of Strings containing the resource's keys.


getParentResource

public Resource getParentResource()
Gets a Resource object that represents the parent of the current resource. If the resource does not have a parent, the value of null must be returned.

Returns:
the Resource object of the parent resource.


getType

public String getType()
Gets the type of this resource.

Returns:
the type of this resource, represented as a String.


getValues

public String[] getValues()
Gets the values corresponding to the keys of this resource's type. This array may be shorter than the array returned by getKeys because the latter depends only on the type of the resource.

Returns:
an array of Strings representing the keys' values for this resource type.


hashCode

public int hashCode()
Returns an identifier for the resource as a hash code.

Returns:
the hashcode value for the resource.


toString

public String toString()
Returns a string representation of this resource.

Returns:
the resource, represented as a String.


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs91
Copyright 2005 BEA Systems Inc.