de.smartics.properties.spi.config.cache
Class CacheMessageBean

Package class diagram package CacheMessageBean
java.lang.Object
  extended by de.smartics.exceptions.i18n.AbstractMessageBean
      extended by de.smartics.properties.api.core.app.AbstractBaseMessageBean
          extended by de.smartics.properties.spi.config.cache.CacheMessageBean
All Implemented Interfaces:
de.smartics.exceptions.i18n.MessageBean, Serializable

public class CacheMessageBean
     
     
extends AbstractBaseMessageBean

Provides context information for problems dealing with caches.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.smartics.exceptions.i18n.AbstractMessageBean
code, localizedInfo
 
Constructor Summary
CacheMessageBean(CacheCode code, String cacheConfiguration, String cacheId, String missingProperty)
          Constructor without cause.
CacheMessageBean(CacheCode code, Throwable cause, String cacheConfiguration, String cacheId, String missingProperty)
          Default constructor.
 
Method Summary
static CacheMessageBean configFailure(Throwable cause, String cacheConfiguration)
          Returns a message bean signaling that the cache configuration file cannot be loaded.
static CacheMessageBean jndi(NamingException cause, String cacheConfiguration, String cacheId)
          Returns a message bean signaling that accessing the cache via JNDI failed.
static CacheMessageBean missingProperty(String cacheConfiguration, String missingProperty)
          Returns a message bean signaling that the mandatory cache configuration property is missing in the cache configuration.
 
Methods inherited from class de.smartics.exceptions.i18n.AbstractMessageBean
getCause, getCauseTrail, getCauseTrail, getClassLoader, getCode, getLocalizedInfo, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedTextMessage, getLocalizedTextMessage, getLocalizedTextMessage, getMessage, getMessage, getMessage, getMessages, getMessages, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheMessageBean

public CacheMessageBean(CacheCode code,
                        String cacheConfiguration,
                        String cacheId,
                        String missingProperty)
Constructor without cause.

Parameters:
code - the error or exception code of the exception.
cacheConfiguration - the location of the cache configuration.
cacheId - the identifier of the cache.
missingProperty - the identifier of the missing cache configuration property.

CacheMessageBean

public CacheMessageBean(CacheCode code,
                        Throwable cause,
                        String cacheConfiguration,
                        String cacheId,
                        String missingProperty)
Default constructor.

Parameters:
code - the error or exception code of the exception.
cause - the cause to the problem.
cacheConfiguration - the location of the cache configuration.
cacheId - the identifier of the cache.
missingProperty - the identifier of the missing cache configuration property.
Method Detail

missingProperty

public static CacheMessageBean missingProperty(String cacheConfiguration,
                                               String missingProperty)
Returns a message bean signaling that the mandatory cache configuration property is missing in the cache configuration.

Parameters:
cacheConfiguration - the descriptor to the cache configuration file.
missingProperty - the identifier of the missing cache configuration property.
Returns:
the message bean.

configFailure

public static CacheMessageBean configFailure(Throwable cause,
                                             String cacheConfiguration)
Returns a message bean signaling that the cache configuration file cannot be loaded.

Parameters:
cause - the cause to the problem.
cacheConfiguration - the descriptor to the cache configuration file that caused the problem.
Returns:
the message bean.

jndi

public static CacheMessageBean jndi(NamingException cause,
                                    String cacheConfiguration,
                                    String cacheId)
Returns a message bean signaling that accessing the cache via JNDI failed.

Parameters:
cause - the cause to the problem.
cacheConfiguration - the descriptor to the cache configuration file that caused the problem.
cacheId - the identifier of the cache.
Returns:
the message bean.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.