*** empty log message ***

This commit is contained in:
Eric J. Bowersox
2003-05-20 03:25:31 +00:00
commit b80fa05ed1
682 changed files with 85738 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class AuthenticationException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public AuthenticationException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public AuthenticationException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
} // end class AuthenticationException

View File

@@ -0,0 +1,104 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
import com.silverwrist.dynamo.iface.DynamicClass;
public class CallFailureException extends DynamicObjectException
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static final String BUNDLE = "com.silverwrist.dynamo.except.DynamoExceptionMessages";
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private Object[] m_args;
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public CallFailureException(DynamicClass klass, Throwable cause)
{
super("call to dynamic class " + klass.getName() + " failed with " + cause.getClass().getName(),cause);
m_args = new Object[2];
m_args[0] = klass.getName();
m_args[1] = cause.getClass().getName();
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return this.getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(BUNDLE,locale,getClass().getClassLoader());
return MessageFormat.format(b.getString("callFailure"),m_args);
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
public Throwable getTargetException()
{
return getCause();
} // end getTargetException
} // end class CallFailureException

View File

@@ -0,0 +1,122 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
import com.silverwrist.dynamo.iface.DynamicClass;
public class CodeNotFoundException extends DynamicObjectException
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static final String BUNDLE = "com.silverwrist.dynamo.except.DynamoExceptionMessages";
public static final int CALL = 0;
public static final int GET = 1;
public static final int SET = 2;
public static final int PROPERTY = 3;
private static final String[] s_messages =
{ "codeNotFound.call", "codeNotFound.get", "codeNotFound.set", "codeNotFound.prop" };
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private String m_message_id;
private Object[] m_args;
private String m_message = null;
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
public CodeNotFoundException(DynamicClass klass, int selector, String name)
{
super("");
m_message_id = s_messages[selector];
m_args = new Object[2];
m_args[0] = klass.getName();
m_args[1] = name;
} // end constructor
public CodeNotFoundException(DynamicClass klass, int selector, String name, Throwable inner)
{
super("",inner);
m_message_id = s_messages[selector];
m_args = new Object[2];
m_args[0] = klass.getName();
m_args[1] = name;
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
public String getMessage()
{
if (m_message==null)
m_message = getLocalizedMessage(Locale.US);
return m_message;
} // end getMessage
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return this.getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(BUNDLE,locale,getClass().getClassLoader());
return MessageFormat.format(b.getString(m_message_id),m_args);
} // end getLocalizedMessage
} // end class CodeNotFoundException

View File

@@ -0,0 +1,91 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.*;
import org.w3c.dom.*;
import com.silverwrist.util.xml.XMLLoadException;
public class ConfigException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private Node m_locus = null; // locus in configuration of exception
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public ConfigException(XMLLoadException xle)
{
super(ConfigException.class,"DynamoExceptionMessages","configException.xmlLoadException",xle);
setParameter(0,xle.getMessage());
m_locus = xle.getLocus();
} // end constructor
public ConfigException(ModuleException me)
{
super(ConfigException.class,"DynamoExceptionMessages","configException.moduleException",me);
setParameter(0,me.getMessage());
} // end constructor
public ConfigException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public ConfigException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
public ConfigException(Class caller, String bundle, String message_id, Node locus)
{
super(caller,bundle,message_id);
m_locus = locus;
} // end constructor
public ConfigException(Class caller, String bundle, String message_id, Throwable inner, Node locus)
{
super(caller,bundle,message_id,inner);
m_locus = locus;
} // end constructor
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
public Node getLocus()
{
return m_locus;
} // end getLocus
} // end class ConfigException

View File

@@ -0,0 +1,65 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
/**
* An exception thrown indicating a problem with the database. This commonly wraps a
* <CODE>java.sql.SQLException</CODE>, but may also indicate a problem with a connection pool or such.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
*/
public class DatabaseException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>DatabaseException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
*/
public DatabaseException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
/**
* Constructs a new <CODE>DatabaseException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
* @param inner The exception to be nested inside this one.
*/
public DatabaseException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
} // end class DatabaseException

View File

@@ -0,0 +1,84 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.*;
import org.w3c.dom.*;
import com.silverwrist.util.xml.XMLLoadException;
public class DialogException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private Node m_locus = null; // locus in configuration of exception
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public DialogException(XMLLoadException xle)
{
super(DialogException.class,"DynamoExceptionMessages","dialogException.xmlLoadException",xle);
setParameter(0,xle.getMessage());
m_locus = xle.getLocus();
} // end constructor
public DialogException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public DialogException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
public DialogException(Class caller, String bundle, String message_id, Node locus)
{
super(caller,bundle,message_id);
m_locus = locus;
} // end constructor
public DialogException(Class caller, String bundle, String message_id, Throwable inner, Node locus)
{
super(caller,bundle,message_id,inner);
m_locus = locus;
} // end constructor
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
public Node getLocus()
{
return m_locus;
} // end getLocus
} // end class DialogException

View File

@@ -0,0 +1,70 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class DynamicObjectException extends DynamoException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>DynamicObjectException</CODE>.
*/
public DynamicObjectException()
{
super();
} // end constructor
/**
* Constructs a new <CODE>DynamicObjectException</CODE> with a text message.
*
* @param msg The message to set in this exception.
*/
public DynamicObjectException(String msg)
{
super(msg);
} // end constructor
/**
* Constructs a new <CODE>DynamicObjectException</CODE> wrapping another exception.
*
* @param inner The exception wrapped by this one.
*/
public DynamicObjectException(Throwable inner)
{
super(inner);
} // end constructor
/**
* Constructs a new <CODE>DynamicObjectException</CODE> wrapping another exception.
*
* @param msg The message to set in this exception.
* @param inner The exception wrapped by this one.
*/
public DynamicObjectException(String msg, Throwable inner)
{
super(msg,inner);
} // end constructor
} // end class DynamicObjectException

View File

@@ -0,0 +1,70 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class DynamicObjectRuntimeException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>DynamicObjectRuntimeException</CODE>.
*/
public DynamicObjectRuntimeException()
{
super();
} // end constructor
/**
* Constructs a new <CODE>DynamicObjectRuntimeException</CODE> with a text message.
*
* @param msg The message to set in this exception.
*/
public DynamicObjectRuntimeException(String msg)
{
super(msg);
} // end constructor
/**
* Constructs a new <CODE>DynamicObjectRuntimeException</CODE> wrapping another exception.
*
* @param inner The exception wrapped by this one.
*/
public DynamicObjectRuntimeException(Throwable inner)
{
super(inner);
} // end constructor
/**
* Constructs a new <CODE>DynamicObjectRuntimeException</CODE> wrapping another exception.
*
* @param msg The message to set in this exception.
* @param inner The exception wrapped by this one.
*/
public DynamicObjectRuntimeException(String msg, Throwable inner)
{
super(msg,inner);
} // end constructor
} // end class DynamicObjectRuntimeException

View File

@@ -0,0 +1,98 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.util.Locale;
/**
* The root exception of all checked exceptions thrown by the Dynamo core code. It is capable of
* &quot;wrapping&quot; another exception within it.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
*/
public class DynamoException extends Exception
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>DynamoException</CODE>.
*/
public DynamoException()
{
super();
} // end constructor
/**
* Constructs a new <CODE>DynamoException</CODE> with a text message.
*
* @param msg The message to set in this exception.
*/
public DynamoException(String msg)
{
super(msg);
} // end constructor
/**
* Constructs a new <CODE>DynamoException</CODE> wrapping another exception.
*
* @param inner The exception wrapped by this one.
*/
public DynamoException(Throwable inner)
{
super(inner);
} // end constructor
/**
* Constructs a new <CODE>DynamoException</CODE> wrapping another exception.
*
* @param msg The message to set in this exception.
* @param inner The exception wrapped by this one.
*/
public DynamoException(String msg, Throwable inner)
{
super(msg,inner);
} // end constructor
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
return getMessage();
} // end getLocalizedMessage
} // end class DynamoException

View File

@@ -0,0 +1,33 @@
# The contents of this file are subject to the Mozilla Public License Version 1.1
# (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
#
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
# language governing rights and limitations under the License.
#
# The Original Code is the Venice Web Communities System.
#
# The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
# for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
# Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
#
# Contributor(s):
# ---------------------------------------------------------------------------------
# This file has been localized for the en_US locale
noSuchServiceException.1={0}: no service with class {1}
noSuchServiceException.2={0}: no service with class {1} and ID {2}
noSuchObjectException={0}: no such object {2} in namespace {1}
noSuchResourceException=Resource not found: {0}
configException.xmlLoadException=Error in XML configuration: {0}
configException.moduleException=Error loading module at startup: {0}
requestParseException.msg=Error parsing request: {0}
codeNotFound.call=Method {0} not found in dynamic class {1}
codeNotFound.get=Getter for property {0} not found in dynamic class {1}
codeNotFound.set=Setter for property {0} not found in dynamic class {1}
codeNotFound.prop=Property {0} not found in dynamic class {1}
callFailure=Call to dynamic class {0} failed with {1}
scriptingException=Error executing {0}[{1}]: {2}
renderClass.creation=Unable to create object of class {0} at rendering time.
dialogException.xmlLoadException=Error in XML dialog definition: {0}
udfe.bad.itemType=No implementation exists for dialog item type "{0}".

View File

@@ -0,0 +1,98 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.util.Locale;
/**
* The root exception of all unchecked exceptions thrown by the Dynamo core code. It is capable of
* &quot;wrapping&quot; another exception within it.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
*/
public class DynamoRuntimeException extends RuntimeException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>DynamoRuntimeException</CODE>.
*/
public DynamoRuntimeException()
{
super();
} // end constructor
/**
* Constructs a new <CODE>DynamoRuntimeException</CODE> with a text message.
*
* @param msg The message to set in this exception.
*/
public DynamoRuntimeException(String msg)
{
super(msg);
} // end constructor
/**
* Constructs a new <CODE>DynamoRuntimeException</CODE> wrapping another exception.
*
* @param inner The exception wrapped by this one.
*/
public DynamoRuntimeException(Throwable inner)
{
super(inner);
} // end constructor
/**
* Constructs a new <CODE>DynamoRuntimeException</CODE> wrapping another exception.
*
* @param msg The message to set in this exception.
* @param inner The exception wrapped by this one.
*/
public DynamoRuntimeException(String msg, Throwable inner)
{
super(msg,inner);
} // end constructor
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
return getMessage();
} // end getLocalizedMessage
} // end class DynamoRuntimeException

View File

@@ -0,0 +1,39 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class DynamoSecurityException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public DynamoSecurityException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public DynamoSecurityException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
} // end class DynamoSecurityException

View File

@@ -0,0 +1,206 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.*;
import com.silverwrist.util.StringUtils;
/**
* An exception type which is externally reflected and contains a localizable message. The message is loaded
* from a <CODE>ResourceBundle</CODE> as needed.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
*/
public class ExternalException extends DynamoException
{
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private ClassLoader m_classloader; // classloader to load resource bundle from
private String m_bundle_name; // resource bundle name
private String m_message_id; // message ID to load message from
private String m_message = null; // non-localized message (cached)
private ArrayList m_args = null; // argument list
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>ExternalException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
*/
public ExternalException(Class caller, String bundle, String message_id)
{
super("");
setup(caller,bundle,message_id);
} // end constructor
/**
* Constructs a new <CODE>ExternalException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
* @param inner The exception to be nested inside this one.
*/
public ExternalException(Class caller, String bundle, String message_id, Throwable inner)
{
super("",inner);
setup(caller,bundle,message_id);
} // end constructor
/**
* Constructs a copy of an <CODE>ExternalException</CODE>.
*
* @param other The <CODE>ExternalException</CODE> to be cloned.
*/
protected ExternalException(ExternalException other)
{
super("",other);
m_classloader = other.m_classloader;
m_bundle_name = other.m_bundle_name;
m_message_id = other.m_message_id;
m_message = other.m_message;
if (other.m_args!=null)
m_args = (ArrayList)(other.m_args.clone());
} // end constructor
/*--------------------------------------------------------------------------------
* Internal operations
*--------------------------------------------------------------------------------
*/
/**
* Sets up the instance variables of this <CODE>ExternalException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
*/
private final void setup(Class caller, String bundle, String message_id)
{
m_classloader = caller.getClassLoader();
String name = caller.getName();
int p = name.lastIndexOf('.');
m_bundle_name = name.substring(0,p+1) + bundle;
m_message_id = message_id;
} // end setup
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
/**
* Returns the detail message string of this exception.
*
* @return The detail message string of this <CODE>Throwable</CODE> instance (which may be <CODE>null</CODE>).
*/
public String getMessage()
{
if (m_message==null)
m_message = this.getLocalizedMessage(Locale.US);
return m_message;
} // end getMessage
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(m_bundle_name,locale,m_classloader);
if (m_args==null)
return b.getString(m_message_id);
else
return MessageFormat.format(b.getString(m_message_id),m_args.toArray());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
/**
* Sets a replacement parameter for the message.
*
* @param index The index of the parameter to set.
* @param param The parameter to be set for the message.
*/
public void setParameter(int index, String param)
{
if (m_args==null)
m_args = new ArrayList();
if (m_args.size()>index)
{ // setting an index that already exists
m_args.set(index,param);
return;
} // end if
// this needs to be tacked onto the end somewhere
while (m_args.size()<index)
m_args.add(null);
m_args.add(param);
} // end setParameter
} // end class ExternalException

View File

@@ -0,0 +1,189 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.*;
import com.silverwrist.util.StringUtils;
/**
* An exception type which is externally reflected and contains a localizable message. The message is loaded
* from a <CODE>ResourceBundle</CODE> as needed.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
*/
public class ExternalRuntimeException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private ClassLoader m_classloader; // classloader to load resource bundle from
private String m_bundle_name; // resource bundle name
private String m_message_id; // message ID to load message from
private String m_message = null; // non-localized message (cached)
private ArrayList m_args = null; // argument list
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>ExternalRuntimeException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
*/
public ExternalRuntimeException(Class caller, String bundle, String message_id)
{
super("");
setup(caller,bundle,message_id);
} // end constructor
/**
* Constructs a new <CODE>ExternalRuntimeException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
* @param inner The exception to be nested inside this one.
*/
public ExternalRuntimeException(Class caller, String bundle, String message_id, Throwable inner)
{
super("",inner);
setup(caller,bundle,message_id);
} // end constructor
/*--------------------------------------------------------------------------------
* Internal operations
*--------------------------------------------------------------------------------
*/
/**
* Sets up the instance variables of this <CODE>ExternalRuntimeException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
*/
private final void setup(Class caller, String bundle, String message_id)
{
m_classloader = caller.getClassLoader();
String name = caller.getName();
int p = name.lastIndexOf('.');
m_bundle_name = name.substring(0,p+1) + bundle;
m_message_id = message_id;
} // end setup
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
/**
* Returns the detail message string of this exception.
*
* @return The detail message string of this <CODE>Throwable</CODE> instance (which may be <CODE>null</CODE>).
*/
public String getMessage()
{
if (m_message==null)
m_message = getLocalizedMessage(Locale.US);
return m_message;
} // end getMessage
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(m_bundle_name,locale,m_classloader);
if (m_args==null)
return b.getString(m_message_id);
else
return MessageFormat.format(b.getString(m_message_id),m_args.toArray());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
/**
* Sets a replacement parameter for the message.
*
* @param index The index of the parameter to set.
* @param param The parameter to be set for the message.
*/
public void setParameter(int index, String param)
{
if (m_args==null)
m_args = new ArrayList();
if (m_args.size()>index)
{ // setting an index that already exist
m_args.set(index,param);
return;
} // end if
// this needs to be tacked onto the end somewhere
while (m_args.size()<index)
m_args.add(null);
m_args.add(param);
} // end setParameter
} // end class ExternalRuntimeException

View File

@@ -0,0 +1,78 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.util.Locale;
public class GroupRuntimeException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
public GroupRuntimeException(DynamoException inner)
{
super(inner);
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
public String getMessage()
{
return getCause().getMessage();
} // end getMessage
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return getCause().getLocalizedMessage();
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
return ((DynamoException)getCause()).getLocalizedMessage(locale);
} // end getLocalizedMessage
} // end class GroupRuntimeException

View File

@@ -0,0 +1,39 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class MailException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public MailException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public MailException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
} // end class MailException

View File

@@ -0,0 +1,58 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2003 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class ModuleException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>ModuleException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
*/
public ModuleException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
/**
* Constructs a new <CODE>ModuleException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
* @param inner The exception to be nested inside this one.
*/
public ModuleException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
} // end class ModuleException

View File

@@ -0,0 +1,142 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* An exception thrown by objects that implement <CODE>ObjectProvider</CODE> when they
* don't contain a specified object.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
* @see com.silverwrist.dynamo.iface.ObjectProvider
*/
public class NoSuchObjectException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static final String BUNDLE = "com.silverwrist.dynamo.except.DynamoExceptionMessages";
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private String m_context; // context of request
private Object[] m_args; // arguments list to generate
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>NoSuchObjectException</CODE>.
*
* @param context Context for the generated exception.
* @param namespace Namespace of the object that was requested.
* @param name Name of the object that was requested.
*/
public NoSuchObjectException(String context, String namespace, String name)
{
super(context + ": no such object " + name + " in namespace " + namespace);
m_context = context;
m_args = new Object[3];
m_args[0] = context;
m_args[1] = namespace;
m_args[2] = name;
} // end constructor
public NoSuchObjectException(String context, String namespace, String name, Throwable inner)
{
super(context + ": no such object " + name + " in namespace " + namespace,inner);
m_context = context;
m_args = new Object[3];
m_args[0] = context;
m_args[1] = namespace;
m_args[2] = name;
} // end constructor
public NoSuchObjectException(String context, NoSuchObjectException other)
{
super(morphMessage(other,context),other);
m_context = context;
m_args = new Object[other.m_args.length];
System.arraycopy(other.m_args,0,m_args,0,other.m_args.length);
m_args[0] = context;
} // end constructor
/*--------------------------------------------------------------------------------
* Internal operations
*--------------------------------------------------------------------------------
*/
private static final String morphMessage(NoSuchObjectException other, String new_context)
{
return new_context + other.getMessage().substring(other.m_context.length());
} // end morphMessage
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return this.getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(BUNDLE,locale,getClass().getClassLoader());
return MessageFormat.format(b.getString("noSuchObjectException"),m_args);
} // end getLocalizedMessage
} // end class NoSuchObjectException

View File

@@ -0,0 +1,99 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
public class NoSuchResourceException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static final String BUNDLE = "com.silverwrist.dynamo.except.DynamoExceptionMessages";
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private Object[] m_args; // arguments list to generate
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
public NoSuchResourceException(String resource_path)
{
super("resource not found: " + resource_path);
m_args = new Object[1];
m_args[0] = resource_path;
} // end constructor
public NoSuchResourceException(String resource_path, Throwable inner)
{
super("resource not found: " + resource_path,inner);
m_args = new Object[1];
m_args[0] = resource_path;
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return this.getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(BUNDLE,locale,getClass().getClassLoader());
return MessageFormat.format(b.getString("noSuchResourceException"),m_args);
} // end getLocalizedMessage
} // end class NoSuchResourceException

View File

@@ -0,0 +1,224 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* An exception thrown by objects that implement <CODE>ServiceProvider</CODE> when they
* don't implement a service of a specified class and ID.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
* @see com.silverwrist.dynamo.iface.ServiceProvider
*/
public class NoSuchServiceException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static final String BUNDLE = "com.silverwrist.dynamo.except.DynamoExceptionMessages";
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private String m_context; // context string
private String m_message_id; // ID of the message to generate
private Class m_klass; // class of the service we were asking for
private String m_serviceid; // service ID of the service we were asking for
private Object[] m_args; // arguments list to generate
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>NoSuchServiceException</CODE>.
*
* @param context Context for the generated exception.
* @param klass Class of the service that was requested.
*/
public NoSuchServiceException(String context, Class klass)
{
super(context + ": no service with class " + klass.getName());
m_context = context;
m_klass = klass;
m_serviceid = null;
m_message_id = "noSuchServiceException.1";
m_args = new Object[2];
m_args[0] = context;
m_args[1] = klass.getName();
} // end constructor
/**
* Constructs a new <CODE>NoSuchServiceException</CODE>.
*
* @param context Context for the generated exception.
* @param klass Class of the service that was requested.
* @param inner Inner exception which caused this one.
*/
public NoSuchServiceException(String context, Class klass, Throwable inner)
{
super(context + ": no service with class " + klass.getName(),inner);
m_context = context;
m_klass = klass;
m_serviceid = null;
m_message_id = "noSuchServiceException.1";
m_args = new Object[2];
m_args[0] = context;
m_args[1] = klass.getName();
} // end constructor
/**
* Constructs a new <CODE>NoSuchServiceException</CODE>.
*
* @param context Context for the generated exception.
* @param klass Class of the service that was requested.
* @param serviceid ID of the service that was requested.
*/
public NoSuchServiceException(String context, Class klass, String serviceid)
{
super(context + ": no service with class " + klass.getName() + " and ID " + serviceid);
m_context = context;
m_klass = klass;
m_serviceid = serviceid;
m_message_id = "noSuchServiceException.2";
m_args = new Object[3];
m_args[0] = context;
m_args[1] = klass.getName();
m_args[2] = serviceid;
} // end constructor
/**
* Constructs a new <CODE>NoSuchServiceException</CODE>.
*
* @param context Context for the generated exception.
* @param klass Class of the service that was requested.
* @param serviceid ID of the service that was requested.
* @param inner Inner exception which caused this one.
*/
public NoSuchServiceException(String context, Class klass, String serviceid, Throwable inner)
{
super(context + ": no service with class " + klass.getName() + " and ID " + serviceid,inner);
m_context = context;
m_klass = klass;
m_serviceid = serviceid;
m_message_id = "noSuchServiceException.2";
m_args = new Object[3];
m_args[0] = context;
m_args[1] = klass.getName();
m_args[2] = serviceid;
} // end constructor
public NoSuchServiceException(String context, NoSuchServiceException other)
{
super(morphMessage(other,context),other);
m_context = context;
m_klass = other.m_klass;
m_serviceid = other.m_serviceid;
m_message_id = other.m_message_id;
m_args = new Object[other.m_args.length];
System.arraycopy(other.m_args,0,m_args,0,other.m_args.length);
m_args[0] = context;
} // end constructor
/*--------------------------------------------------------------------------------
* Internal operations
*--------------------------------------------------------------------------------
*/
private static final String morphMessage(NoSuchServiceException other, String new_context)
{
return new_context + other.getMessage().substring(other.m_context.length());
} // end morphMessage
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return this.getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(BUNDLE,locale,getClass().getClassLoader());
return MessageFormat.format(b.getString(m_message_id),m_args);
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
public String getContext()
{
return m_context;
} // end getContext
public Class getServiceClass()
{
return m_klass;
} // end getServiceClass
public String getServiceID()
{
return m_serviceid;
} // end getServiceID
} // end class NoSuchServiceException

View File

@@ -0,0 +1,39 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class ObjectStoreException extends ExternalRuntimeException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public ObjectStoreException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public ObjectStoreException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
} // end class ObjectStoreException

View File

@@ -0,0 +1,84 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.util.Locale;
public class ProxyException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
public ProxyException(Throwable inner)
{
super(inner);
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
public String getMessage()
{
return getCause().getMessage();
} // end getMessage
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return getCause().getLocalizedMessage();
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
Throwable t = getCause();
if (t instanceof DynamoException)
return ((DynamoException)t).getLocalizedMessage(locale);
else if (t instanceof DynamoRuntimeException)
return ((DynamoRuntimeException)t).getLocalizedMessage(locale);
else
return t.getLocalizedMessage();
} // end getLocalizedMessage
} // end class ProxyException

View File

@@ -0,0 +1,55 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.lang.reflect.Constructor;
public class RenderClassCreationException extends RenderingException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public RenderClassCreationException(Class klass)
{
super(RenderClassCreationException.class,"DynamoExceptionMessages","renderClass.creation");
setParameter(0,klass.getName());
} // end constructor
public RenderClassCreationException(Class klass, Throwable inner)
{
super(RenderClassCreationException.class,"DynamoExceptionMessages","renderClass.creation",inner);
setParameter(0,klass.getName());
} // end constructor
public RenderClassCreationException(Constructor ctor)
{
this(ctor.getDeclaringClass());
} // end constructor
public RenderClassCreationException(Constructor ctor, Throwable inner)
{
this(ctor.getDeclaringClass(),inner);
} // end constructor
} // end class RenderClassCreationException

View File

@@ -0,0 +1,77 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
/**
* An exception thrown to indicate a problem with rendering an object. This exception is commonly thrown
* only at output time.
*
* @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
* @version X
*/
public class RenderingException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
/**
* Constructs a new <CODE>RenderingException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
*/
public RenderingException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
/**
* Constructs a new <CODE>RenderingException</CODE> instance.
*
* @param caller The classname of the class that's creating the exception. Its class loader
* and package name will be used, together with <CODE>bundle</CODE>, to find the
* resource bundle.
* @param bundle The name of the resource bundle to be loaded.
* @param message_id The identifier of the message to be loaded from the bundle.
* @param inner The exception to be nested inside this one.
*/
public RenderingException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
/**
* Constructs a new <CODE>RenderingException</CODE> instance, copying the data from a
* {@link com.silverwrist.dynamo.except.DatabaseException DatabaseException} instance.
*
* @param other The <CODE>DatabaseException</CODE> to copy data from.
*/
public RenderingException(DatabaseException other)
{
super(other);
} // end constructor
} // end class RenderingException

View File

@@ -0,0 +1,108 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.ResourceBundle;
public class RequestParseException extends DynamoException
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static final String BUNDLE = "com.silverwrist.dynamo.except.DynamoExceptionMessages";
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private Object[] m_args;
private String m_message = null;
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public RequestParseException(String message)
{
super("");
m_args = new Object[1];
m_args[0] = message;
} // end constructor
public RequestParseException(String message, Throwable inner)
{
super("",inner);
m_args = new Object[1];
m_args[0] = message;
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
public String getMessage()
{
if (m_message==null)
m_message = this.getLocalizedMessage(Locale.US);
return m_message;
} // end getMessage
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return this.getLocalizedMessage(Locale.getDefault());
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
ResourceBundle b = ResourceBundle.getBundle(BUNDLE,locale,getClass().getClassLoader());
return MessageFormat.format(b.getString("requestParseException.msg"),m_args);
} // end getLocalizedMessage
} // end class RequestParseException

View File

@@ -0,0 +1,118 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.text.MessageFormat;
import java.util.*;
import com.silverwrist.util.StringUtils;
public class ScriptingException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------
*/
private static final String BUNDLE = "com.silverwrist.dynamo.except.DynamoExceptionMessages";
/*--------------------------------------------------------------------------------
* Attributes
*--------------------------------------------------------------------------------
*/
private String m_source = null;
private String m_language = null;
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public ScriptingException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public ScriptingException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
public ScriptingException(String source, String language, Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
m_source = source;
m_language = language;
} // end constructor
public ScriptingException(String source, String language, Class caller, String bundle, String message_id,
Throwable inner)
{
super(caller,bundle,message_id,inner);
m_source = source;
m_language = language;
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
if ((m_source==null) || (m_language==null))
return super.getLocalizedMessage(locale);
ResourceBundle b = ResourceBundle.getBundle(BUNDLE,locale,getClass().getClassLoader());
Object[] args = new Object[3];
args[0] = m_source;
args[1] = m_language;
args[2] = super.getLocalizedMessage(locale);
return MessageFormat.format(b.getString("scriptingException"),args);
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
public final String getSource()
{
return m_source;
} // end getSource
public final String getLanguage()
{
return m_language;
} // end getLanguage
} // end class ScriptingException

View File

@@ -0,0 +1,78 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import java.util.Locale;
public class SecurityRuntimeException extends DynamoRuntimeException
{
/*--------------------------------------------------------------------------------
* Constructor
*--------------------------------------------------------------------------------
*/
public SecurityRuntimeException(DynamoException inner)
{
super(inner);
} // end constructor
/*--------------------------------------------------------------------------------
* Overrides from class Throwable
*--------------------------------------------------------------------------------
*/
public String getMessage()
{
return getCause().getMessage();
} // end getMessage
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getMessage()</CODE>.
*
* @return The localized description of this exception.
*/
public String getLocalizedMessage()
{
return getCause().getLocalizedMessage();
} // end getLocalizedMessage
/*--------------------------------------------------------------------------------
* Overrides from class DynamoRuntimeException
*--------------------------------------------------------------------------------
*/
/**
* Creates a localized description of this exception. Subclasses may override this method in
* order to produce a locale-specific message. For subclasses that do not override this method,
* the default implementation returns the same result as <CODE>getLocalizedMessage()</CODE>.
*
* @param locale The locale to render the message in.
* @return The localized description of this exception.
*/
public String getLocalizedMessage(Locale locale)
{
return ((DynamoException)getCause()).getLocalizedMessage(locale);
} // end getLocalizedMessage
} // end class SecurityRuntimeException

View File

@@ -0,0 +1,57 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
import org.w3c.dom.Node;
public class UnknownDialogFieldException extends DialogException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public UnknownDialogFieldException(String fieldname)
{
super(UnknownDialogFieldException.class,"DynamoExceptionMessages","udfe.bad.itemType");
setParameter(0,fieldname);
} // end constructor
public UnknownDialogFieldException(String fieldname, Node locus)
{
super(UnknownDialogFieldException.class,"DynamoExceptionMessages","udfe.bad.itemType",locus);
setParameter(0,fieldname);
} // end constructor
public UnknownDialogFieldException(String fieldname, Throwable inner)
{
super(UnknownDialogFieldException.class,"DynamoExceptionMessages","udfe.bad.itemType",inner);
setParameter(0,fieldname);
} // end constructor
public UnknownDialogFieldException(String fieldname, Throwable inner, Node locus)
{
super(UnknownDialogFieldException.class,"DynamoExceptionMessages","udfe.bad.itemType",inner,locus);
setParameter(0,fieldname);
} // end constructor
} // end class UnknownDialogFieldException

View File

@@ -0,0 +1,39 @@
/*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is the Venice Web Communities System.
*
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
* Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
*
* Contributor(s):
*/
package com.silverwrist.dynamo.except;
public class ValidationException extends ExternalException
{
/*--------------------------------------------------------------------------------
* Constructors
*--------------------------------------------------------------------------------
*/
public ValidationException(Class caller, String bundle, String message_id)
{
super(caller,bundle,message_id);
} // end constructor
public ValidationException(Class caller, String bundle, String message_id, Throwable inner)
{
super(caller,bundle,message_id,inner);
} // end constructor
} // end class ValidationException