|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.smartlab.web.Domain
public abstract class Domain
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
Provides logging capabilities to the domain. |
Constructor Summary | |
---|---|
protected |
Domain()
Subclasses should make their own constructors private and behave like singletons. |
Method Summary | |
---|---|
protected org.hibernate.Transaction |
begin(BusinessObjectFactory factory)
Starts a new transaction, allowing all the operations performed in the same context to be atomically applied (commit) or reverted (rollback). |
protected void |
commit(org.hibernate.Transaction transaction)
Commits the specified transaction applying all the changes happened since its beginning. |
net.smartlab.config.Configuration |
getConfiguration()
Returns the Configuration instance used by this instance. |
net.smartlab.config.Configuration |
getConfiguration(java.lang.String filename)
Returns the Configuration instance used by this instance. |
static java.lang.String |
getLastArchiveName(java.lang.Class type)
Returns the name of the last archive containing the class or an empty string if the class is in no archive. |
static java.net.URL |
getResource(java.lang.Class context,
java.lang.String[] names)
Returns the first resource in the list available in the specified context. |
protected void |
rollback(org.hibernate.Transaction transaction)
Rollbacks the specified transaction reverting all the changes happened since its beginning. |
static void |
setConfigurationStrategy(DomainConfigurationStrategy strategy)
Changes the strategy used to configure the domain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
protected Domain()
Method Detail |
---|
protected org.hibernate.Transaction begin(BusinessObjectFactory factory) throws BusinessException
BusinessObjectFactory
instance but the context spans over all the instances sharing the same
configuration.
factory
- the identifier for the context
BusinessException
- if something wrong occurs during the operation.protected void commit(org.hibernate.Transaction transaction) throws BusinessException
transaction
- the transaction to commit.
BusinessException
- if something wrong occurs during the operation.protected void rollback(org.hibernate.Transaction transaction) throws BusinessException
transaction
- the transaction to rollback.
BusinessException
- if something wrong occurs during the operation.public static void setConfigurationStrategy(DomainConfigurationStrategy strategy)
strategy
- an implementation of the
DomainConfigurationStrategy
interface.public net.smartlab.config.Configuration getConfiguration() throws net.smartlab.config.ConfigurationException
Configuration
instance used by this instance.
Configuration
instance used by this instance.
net.smartlab.config.ConfigurationException
- if something wrong occurs while reading
the configuration file, usually meaning the configuration file is
missing.public net.smartlab.config.Configuration getConfiguration(java.lang.String filename) throws net.smartlab.config.ConfigurationException
Configuration
instance used by this instance.
filename
- the configuration file name.
Configuration
instance used by this instance.
net.smartlab.config.ConfigurationException
- if something wrong occurs while reading
the configuration file, usually meaning the configuration file is
missing.public static java.net.URL getResource(java.lang.Class context, java.lang.String[] names)
context
- the class identifying the search context.names
- the list, ordered from first to last, of resources to search
for.
public static java.lang.String getLastArchiveName(java.lang.Class type)
empty
string if the class is in no archive.
type
- the class to search for.
empty
string if the class is in no archive.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |