com.metamatrix.platform.security.audit.config
Class UnmodifiableAuditConfiguration

java.lang.Object
  extended by com.metamatrix.platform.security.audit.config.UnmodifiableAuditConfiguration
All Implemented Interfaces:
AuditConfiguration, java.lang.Cloneable, java.lang.Comparable

public class UnmodifiableAuditConfiguration
extends java.lang.Object
implements AuditConfiguration


Constructor Summary
UnmodifiableAuditConfiguration(AuditConfiguration orig)
           
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(java.lang.Object obj)
          Compares this object to another.
 java.lang.Object deepClone()
           
 void discardContext(java.lang.String context)
          This method always throws an UnsupportedOperationException.
 void discardContexts(java.util.Collection contexts)
          This method always throws an UnsupportedOperationException.
 boolean equals(java.lang.Object obj)
          Returns true if the specified object is semantically equal to this instance.
 int getAuditLevel()
          Get the level of detail of messages that are currently being recorded.
 java.util.Set getDiscardedContexts()
          Obtain the set of contexts for messages that are to be discarded.
 boolean isContextDiscarded(java.lang.String context)
           
 boolean isLevelDiscarded(int level)
           
 void recordAllContexts()
          This method always throws an UnsupportedOperationException.
 void recordContext(java.lang.String context)
          This method always throws an UnsupportedOperationException.
 void recordContexts(java.util.Collection contexts)
          This method always throws an UnsupportedOperationException.
 void setAuditLevel(int newMessageLevel)
          This method always throws an UnsupportedOperationException.
 java.lang.String toString()
          String representation of logging configuration.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnmodifiableAuditConfiguration

public UnmodifiableAuditConfiguration(AuditConfiguration orig)
Method Detail

isContextDiscarded

public boolean isContextDiscarded(java.lang.String context)
Specified by:
isContextDiscarded in interface AuditConfiguration

isLevelDiscarded

public boolean isLevelDiscarded(int level)
Specified by:
isLevelDiscarded in interface AuditConfiguration

getAuditLevel

public int getAuditLevel()
Get the level of detail of messages that are currently being recorded.

Specified by:
getAuditLevel in interface AuditConfiguration
Returns:
the level of detail

getDiscardedContexts

public java.util.Set getDiscardedContexts()
Obtain the set of contexts for messages that are to be discarded. If this method returns an empty set, then messages in all contexts are being recorded; if not empty, then messages with a context in the returned set are discarded and messages for all other contexts recorded.

Specified by:
getDiscardedContexts in interface AuditConfiguration
Returns:
the set of contexts for messages that are to be discarded

discardContexts

public void discardContexts(java.util.Collection contexts)
This method always throws an UnsupportedOperationException.

Specified by:
discardContexts in interface AuditConfiguration
Parameters:
contexts - the set of contexts that are to be ignored for logging; this method does nothing if the reference is null or empty

discardContext

public void discardContext(java.lang.String context)
This method always throws an UnsupportedOperationException.

Specified by:
discardContext in interface AuditConfiguration
Parameters:
context - the context to add to the set; this method does nothing if the reference is null

recordAllContexts

public void recordAllContexts()
This method always throws an UnsupportedOperationException.

Specified by:
recordAllContexts in interface AuditConfiguration

recordContext

public void recordContext(java.lang.String context)
This method always throws an UnsupportedOperationException.

Specified by:
recordContext in interface AuditConfiguration
Parameters:
context - the context for messages that should be recorded; this method does nothing if the reference is null

recordContexts

public void recordContexts(java.util.Collection contexts)
This method always throws an UnsupportedOperationException.

Specified by:
recordContexts in interface AuditConfiguration
Parameters:
contexts - the set of contexts that are to be recorded; this method does nothing if the reference is null or empty

setAuditLevel

public void setAuditLevel(int newMessageLevel)
This method always throws an UnsupportedOperationException.

Specified by:
setAuditLevel in interface AuditConfiguration
Parameters:
newMessageLevel - the new level.
Throws:
java.lang.IllegalArgumentException - if the level is out of range.

compareTo

public int compareTo(java.lang.Object obj)
Compares this object to another. If the specified object is an instance of the MetadataID class, then this method compares the name; otherwise, it throws a ClassCastException (as instances are comparable only to instances of the same class). Note: this method is consistent with equals(), meaning that (compare(x, y)==0) == (x.equals(y)).

Specified by:
compareTo in interface AuditConfiguration
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - the object that this instance is to be compared to.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object, respectively.
Throws:
java.lang.IllegalArgumentException - if the specified object reference is null
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this instance.

equals

public boolean equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. Note: this method is consistent with compareTo().

Specified by:
equals in interface AuditConfiguration
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object that this instance is to be compared to.
Returns:
whether the object is equal to this object.

toString

public java.lang.String toString()
String representation of logging configuration.

Specified by:
toString in interface AuditConfiguration
Overrides:
toString in class java.lang.Object
Returns:
String representation

clone

public java.lang.Object clone()
Specified by:
clone in interface AuditConfiguration
Overrides:
clone in class java.lang.Object

deepClone

public java.lang.Object deepClone()


Copyright © 2009. All Rights Reserved.