You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/01/22 08:36:26 UTC
svn commit: r1234456 [11/17] - in /incubator/isis/trunk/framework/runtimes:
dflt/bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/classsubstitutor/
dflt/bytecode/dflt/src/main/java/org/apache/isis/runtimes/dflt/bytecode/dflt/obje...
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/InstallerLookup.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/InstallerLookup.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/InstallerLookup.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/InstallerLookup.java Sun Jan 22 07:36:07 2012
@@ -42,14 +42,14 @@ import org.apache.isis.runtimes.dflt.run
import org.apache.isis.runtimes.dflt.runtime.userprofile.UserProfileStoreInstaller;
/**
- * The installers correspond more-or-less to the configurable top-level components of {@link IsisSystem}.
+ * The installers correspond more-or-less to the configurable top-level
+ * components of {@link IsisSystem}.
*
* <p>
- * The methods of {@link InstallerRepository} may be called without {@link #init() initializing} this class, but other
- * methods may not.
+ * The methods of {@link InstallerRepository} may be called without
+ * {@link #init() initializing} this class, but other methods may not.
*/
-public interface InstallerLookup extends InstallerRepository, ApplicationScopedComponent,
- IsisConfigurationBuilderAware, Injectable, SystemDependencyInjector {
+public interface InstallerLookup extends InstallerRepository, ApplicationScopedComponent, IsisConfigurationBuilderAware, Injectable, SystemDependencyInjector {
// /////////////////////////////////////////////////////////
// metamodel
@@ -71,11 +71,9 @@ public interface InstallerLookup extends
TemplateImageLoaderInstaller templateImageLoaderInstaller(String requested);
- PersistenceMechanismInstaller persistenceMechanismInstaller(final String requested,
- final DeploymentType deploymentType);
+ PersistenceMechanismInstaller persistenceMechanismInstaller(final String requested, final DeploymentType deploymentType);
- UserProfileStoreInstaller userProfilePersistenceMechanismInstaller(final String requested,
- DeploymentType deploymentType);
+ UserProfileStoreInstaller userProfilePersistenceMechanismInstaller(final String requested, DeploymentType deploymentType);
IsisViewerInstaller viewerInstaller(final String requested, final String defaultName);
@@ -87,11 +85,14 @@ public interface InstallerLookup extends
* <p>
* Note that this lookup is called in three different contexts:
* <ul>
- * <li>the <tt>IsisExecutionContextFactoryUsingInstallers</tt> uses this to lookup the
- * {@link PersistenceMechanismInstaller} (may be a <tt>ProxyPersistor</tt>)</li>
- * <li>the <tt>IsisExecutionContextFactoryUsingInstallers</tt> also uses this to lookup the
- * {@link FacetDecoratorInstaller}; adds in remoting facets.</li>
- * <li>the <tt>IsisSystemUsingInstallers</tt> uses this to lookup the {@link AuthenticationManagerInstaller}.</li>
+ * <li>the <tt>IsisExecutionContextFactoryUsingInstallers</tt> uses this to
+ * lookup the {@link PersistenceMechanismInstaller} (may be a
+ * <tt>ProxyPersistor</tt>)</li>
+ * <li>the <tt>IsisExecutionContextFactoryUsingInstallers</tt> also uses
+ * this to lookup the {@link FacetDecoratorInstaller}; adds in remoting
+ * facets.</li>
+ * <li>the <tt>IsisSystemUsingInstallers</tt> uses this to lookup the
+ * {@link AuthenticationManagerInstaller}.</li>
* </ul>
*/
ClientConnectionInstaller clientConnectionInstaller(final String requested);
@@ -116,7 +117,8 @@ public interface InstallerLookup extends
* Returns a <i>snapshot</i> of the current {@link IsisConfiguration}.
*
* <p>
- * The {@link IsisConfiguration} could subsequently be appended to if further {@link Installer}s are loaded.
+ * The {@link IsisConfiguration} could subsequently be appended to if
+ * further {@link Installer}s are loaded.
*/
IsisConfiguration getConfiguration();
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ClientConnectionInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ClientConnectionInstaller.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ClientConnectionInstaller.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ClientConnectionInstaller.java Sun Jan 22 07:36:07 2012
@@ -23,8 +23,7 @@ import org.apache.isis.core.metamodel.sp
import org.apache.isis.core.runtime.authentication.AuthenticationManagerInstaller;
import org.apache.isis.core.runtime.authorization.AuthorizationManagerInstaller;
-public interface ClientConnectionInstaller extends PersistenceMechanismInstaller, FacetDecoratorInstaller,
- AuthenticationManagerInstaller, AuthorizationManagerInstaller {
+public interface ClientConnectionInstaller extends PersistenceMechanismInstaller, FacetDecoratorInstaller, AuthenticationManagerInstaller, AuthorizationManagerInstaller {
static String TYPE = "connector";
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/IsisViewerInstallerAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/IsisViewerInstallerAbstract.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/IsisViewerInstallerAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/IsisViewerInstallerAbstract.java Sun Jan 22 07:36:07 2012
@@ -40,7 +40,8 @@ public abstract class IsisViewerInstalle
}
/**
- * Subclasses should override (or else override {@link #createViewer()} if they need to do anything more elaborate.
+ * Subclasses should override (or else override {@link #createViewer()} if
+ * they need to do anything more elaborate.
*/
protected IsisViewer doCreateViewer() {
return null;
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ObjectStorePersistenceMechanismInstallerAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ObjectStorePersistenceMechanismInstallerAbstract.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ObjectStorePersistenceMechanismInstallerAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/ObjectStorePersistenceMechanismInstallerAbstract.java Sun Jan 22 07:36:07 2012
@@ -54,12 +54,12 @@ public abstract class ObjectStorePersist
}
/**
- * Will return a {@link PersistenceSessionObjectStore}; subclasses are free to downcast if required.
+ * Will return a {@link PersistenceSessionObjectStore}; subclasses are free
+ * to downcast if required.
*/
@Override
- protected PersistenceSession createPersistenceSession(final PersistenceSessionFactory persistenceSessionFactory,
- final AdapterManagerExtended adapterManager, final ObjectAdapterFactory adapterFactory,
- final ObjectFactory objectFactory, final OidGenerator oidGenerator, final ServicesInjector servicesInjector) {
+ protected PersistenceSession createPersistenceSession(final PersistenceSessionFactory persistenceSessionFactory, final AdapterManagerExtended adapterManager, final ObjectAdapterFactory adapterFactory, final ObjectFactory objectFactory, final OidGenerator oidGenerator,
+ final ServicesInjector servicesInjector) {
final PersistAlgorithm persistAlgorithm = createPersistAlgorithm(getConfiguration());
ObjectStore objectStore = createObjectStore(getConfiguration(), adapterFactory, adapterManager);
@@ -72,9 +72,7 @@ public abstract class ObjectStorePersist
objectStore = new IsisStoreLogger(objectStore, level);
}
- final PersistenceSessionObjectStore persistenceSession =
- createObjectStorePersistor(persistenceSessionFactory, adapterFactory, objectFactory, servicesInjector,
- oidGenerator, adapterManager, persistAlgorithm, objectStore);
+ final PersistenceSessionObjectStore persistenceSession = createObjectStorePersistor(persistenceSessionFactory, adapterFactory, objectFactory, servicesInjector, oidGenerator, adapterManager, persistAlgorithm, objectStore);
final IsisTransactionManager transactionManager = createTransactionManager(persistenceSession, objectStore);
@@ -93,15 +91,12 @@ public abstract class ObjectStorePersist
// ///////////////////////////////////////////
/**
- * Can optionally be overridden, but by default creates an {@link PersistenceSessionObjectStore}.
+ * Can optionally be overridden, but by default creates an
+ * {@link PersistenceSessionObjectStore}.
*/
- protected PersistenceSessionObjectStore createObjectStorePersistor(
- final PersistenceSessionFactory persistenceSessionFactory, final ObjectAdapterFactory adapterFactory,
- final ObjectFactory objectFactory, final ServicesInjector servicesInjector, final OidGenerator oidGenerator,
- final AdapterManagerExtended adapterManager, final PersistAlgorithm persistAlgorithm,
- final ObjectStorePersistence objectStore) {
- return new PersistenceSessionObjectStore(persistenceSessionFactory, adapterFactory, objectFactory,
- servicesInjector, oidGenerator, adapterManager, persistAlgorithm, objectStore);
+ protected PersistenceSessionObjectStore createObjectStorePersistor(final PersistenceSessionFactory persistenceSessionFactory, final ObjectAdapterFactory adapterFactory, final ObjectFactory objectFactory, final ServicesInjector servicesInjector, final OidGenerator oidGenerator,
+ final AdapterManagerExtended adapterManager, final PersistAlgorithm persistAlgorithm, final ObjectStorePersistence objectStore) {
+ return new PersistenceSessionObjectStore(persistenceSessionFactory, adapterFactory, objectFactory, servicesInjector, oidGenerator, adapterManager, persistAlgorithm, objectStore);
}
/**
@@ -120,8 +115,7 @@ public abstract class ObjectStorePersist
* <p>
* By default returns a {@link ObjectStoreTransactionManager}.
*/
- protected IsisTransactionManager createTransactionManager(final PersistenceSessionTransactionManagement persistor,
- final ObjectStoreTransactionManagement objectStore) {
+ protected IsisTransactionManager createTransactionManager(final PersistenceSessionTransactionManagement persistor, final ObjectStoreTransactionManagement objectStore) {
return new ObjectStoreTransactionManager(persistor, objectStore);
}
@@ -132,7 +126,6 @@ public abstract class ObjectStorePersist
/**
* Hook method to return {@link ObjectStore}.
*/
- protected abstract ObjectStore createObjectStore(IsisConfiguration configuration,
- ObjectAdapterFactory adapterFactory, AdapterManager adapterManager);
+ protected abstract ObjectStore createObjectStore(IsisConfiguration configuration, ObjectAdapterFactory adapterFactory, AdapterManager adapterManager);
}
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installerregistry/installerapi/PersistenceMechanismInstallerAbstract.java Sun Jan 22 07:36:07 2012
@@ -50,19 +50,18 @@ import org.apache.isis.runtimes.dflt.run
import org.apache.log4j.Logger;
/**
- * An abstract implementation of {@link PersistenceMechanismInstaller} that will lookup the {@link ObjectAdapterFactory}
- * and {@link ObjectFactory} from the supplied {@link IsisConfiguration}.
+ * An abstract implementation of {@link PersistenceMechanismInstaller} that will
+ * lookup the {@link ObjectAdapterFactory} and {@link ObjectFactory} from the
+ * supplied {@link IsisConfiguration}.
*
* <p>
* If none can be found, then will default to the {@link PojoAdapterFactory} and
- * {@link PersistenceConstants#OBJECT_FACTORY_CLASS_NAME_DEFAULT default}link ObjectFactory} (cglib at time of writing).
- * respectively.
+ * {@link PersistenceConstants#OBJECT_FACTORY_CLASS_NAME_DEFAULT default}link
+ * ObjectFactory} (cglib at time of writing). respectively.
*/
-public abstract class PersistenceMechanismInstallerAbstract extends InstallerAbstract implements
- PersistenceMechanismInstaller, InstallerLookupAware {
+public abstract class PersistenceMechanismInstallerAbstract extends InstallerAbstract implements PersistenceMechanismInstaller, InstallerLookupAware {
- private static final String LOGGING_PROPERTY = org.apache.isis.core.runtime.logging.Logger.PROPERTY_ROOT
- + "persistenceSession";
+ private static final String LOGGING_PROPERTY = org.apache.isis.core.runtime.logging.Logger.PROPERTY_ROOT + "persistenceSession";
private static final Logger LOG = Logger.getLogger(PersistenceMechanismInstallerAbstract.class);
private SystemDependencyInjector installerLookup;
@@ -79,10 +78,12 @@ public abstract class PersistenceMechani
}
/**
- * Creates a {@link PersistenceSession} that is initialized with the various hook methods.
+ * Creates a {@link PersistenceSession} that is initialized with the various
+ * hook methods.
*
- * @see #createPersistenceSession(PersistenceSessionFactory, AdapterManagerExtended, ObjectAdapterFactory,
- * ObjectFactory, OidGenerator, ServicesInjector)
+ * @see #createPersistenceSession(PersistenceSessionFactory,
+ * AdapterManagerExtended, ObjectAdapterFactory, ObjectFactory,
+ * OidGenerator, ServicesInjector)
* @see #createAdapterFactory(IsisConfiguration)
* @see #createAdapterManager(IsisConfiguration)
* @see #createContainer(IsisConfiguration)
@@ -125,9 +126,7 @@ public abstract class PersistenceMechani
servicesInjector.setServices(serviceList);
persistenceSessionFactory.getSpecificationLoader().injectInto(runtimeContext);
- PersistenceSession persistenceSession =
- createPersistenceSession(persistenceSessionFactory, adapterManager, adapterFactory, objectFactory,
- oidGenerator, servicesInjector);
+ PersistenceSession persistenceSession = createPersistenceSession(persistenceSessionFactory, adapterManager, adapterFactory, objectFactory, oidGenerator, servicesInjector);
if (getConfiguration().getBoolean(LOGGING_PROPERTY, false)) {
final String level = getConfiguration().getString(LOGGING_PROPERTY + ".level", "debug");
@@ -142,78 +141,80 @@ public abstract class PersistenceMechani
// ///////////////////////////////////////////
/**
- * Mandatory hook method called by {@link #createPersistenceSession(PersistenceSessionFactory)}, passing the
+ * Mandatory hook method called by
+ * {@link #createPersistenceSession(PersistenceSessionFactory)}, passing the
* components created by the other (optional) hooks.
*
* @see #createPersistenceSession(PersistenceSessionFactory)
*/
- protected abstract PersistenceSession createPersistenceSession(
- final PersistenceSessionFactory persistenceSessionFactory, final AdapterManagerExtended adapterManager,
- final ObjectAdapterFactory adapterFactory, final ObjectFactory objectFactory, final OidGenerator oidGenerator,
- final ServicesInjector servicesInjector);
+ protected abstract PersistenceSession createPersistenceSession(final PersistenceSessionFactory persistenceSessionFactory, final AdapterManagerExtended adapterManager, final ObjectAdapterFactory adapterFactory, final ObjectFactory objectFactory, final OidGenerator oidGenerator,
+ final ServicesInjector servicesInjector);
// ///////////////////////////////////////////
// Optional hook methods
// ///////////////////////////////////////////
/**
- * Hook method to allow subclasses to specify a different implementation of {@link ObjectAdapterFactory}.
+ * Hook method to allow subclasses to specify a different implementation of
+ * {@link ObjectAdapterFactory}.
*
* <p>
- * By default, looks up implementation from provided {@link IsisConfiguration} using
- * {@link PersistenceConstants#ADAPTER_FACTORY_CLASS_NAME}. If no implementation is specified, then defaults to
+ * By default, looks up implementation from provided
+ * {@link IsisConfiguration} using
+ * {@link PersistenceConstants#ADAPTER_FACTORY_CLASS_NAME}. If no
+ * implementation is specified, then defaults to
* {@value PersistenceConstants#ADAPTER_FACTORY_CLASS_NAME_DEFAULT}.
*/
protected ObjectAdapterFactory createAdapterFactory(final IsisConfiguration configuration) {
- final String configuredClassName =
- configuration.getString(PersistenceConstants.ADAPTER_FACTORY_CLASS_NAME,
- PersistenceConstants.ADAPTER_FACTORY_CLASS_NAME_DEFAULT);
+ final String configuredClassName = configuration.getString(PersistenceConstants.ADAPTER_FACTORY_CLASS_NAME, PersistenceConstants.ADAPTER_FACTORY_CLASS_NAME_DEFAULT);
return InstanceUtil.createInstance(configuredClassName, ObjectAdapterFactory.class);
}
/**
- * Hook method to allow subclasses to specify a different implementation of {@link ObjectFactory}.
+ * Hook method to allow subclasses to specify a different implementation of
+ * {@link ObjectFactory}.
*
* <p>
- * By default, looks up implementation from provided {@link IsisConfiguration} using
- * {@link PersistenceConstants#OBJECT_FACTORY_CLASS_NAME}. If no implementation is specified, then defaults to
+ * By default, looks up implementation from provided
+ * {@link IsisConfiguration} using
+ * {@link PersistenceConstants#OBJECT_FACTORY_CLASS_NAME}. If no
+ * implementation is specified, then defaults to
* {@value PersistenceConstants#OBJECT_FACTORY_CLASS_NAME_DEFAULT}.
*/
protected ObjectFactory createObjectFactory(final IsisConfiguration configuration) {
- final String configuredClassName =
- configuration.getString(PersistenceConstants.OBJECT_FACTORY_CLASS_NAME,
- PersistenceConstants.OBJECT_FACTORY_CLASS_NAME_DEFAULT);
- return InstanceUtil.createInstance(configuredClassName, PersistenceConstants.OBJECT_FACTORY_CLASS_NAME_DEFAULT,
- ObjectFactory.class);
+ final String configuredClassName = configuration.getString(PersistenceConstants.OBJECT_FACTORY_CLASS_NAME, PersistenceConstants.OBJECT_FACTORY_CLASS_NAME_DEFAULT);
+ return InstanceUtil.createInstance(configuredClassName, PersistenceConstants.OBJECT_FACTORY_CLASS_NAME_DEFAULT, ObjectFactory.class);
}
/**
- * Hook method to allow subclasses to specify a different implementation of {@link ServicesInjector}
+ * Hook method to allow subclasses to specify a different implementation of
+ * {@link ServicesInjector}
*
* <p>
- * By default, looks up implementation from provided {@link IsisConfiguration} using
- * {@link PersistenceConstants#SERVICES_INJECTOR_CLASS_NAME}. If no implementation is specified, then defaults to
+ * By default, looks up implementation from provided
+ * {@link IsisConfiguration} using
+ * {@link PersistenceConstants#SERVICES_INJECTOR_CLASS_NAME}. If no
+ * implementation is specified, then defaults to
* {@value PersistenceConstants#SERVICES_INJECTOR_CLASS_NAME_DEFAULT}.
*/
protected ServicesInjector createServicesInjector(final IsisConfiguration configuration) {
- final String configuredClassName =
- configuration.getString(PersistenceConstants.SERVICES_INJECTOR_CLASS_NAME,
- PersistenceConstants.SERVICES_INJECTOR_CLASS_NAME_DEFAULT);
+ final String configuredClassName = configuration.getString(PersistenceConstants.SERVICES_INJECTOR_CLASS_NAME, PersistenceConstants.SERVICES_INJECTOR_CLASS_NAME_DEFAULT);
return InstanceUtil.createInstance(configuredClassName, ServicesInjector.class);
}
/**
- * Hook method to allow subclasses to specify a different implementation of {@link OidGenerator}
+ * Hook method to allow subclasses to specify a different implementation of
+ * {@link OidGenerator}
*
* <p>
- * By default, looks up implementation from provided {@link IsisConfiguration} using
- * {@link PersistenceConstants#OID_GENERATOR_CLASS_NAME}. If no implementation is specified, then defaults to
+ * By default, looks up implementation from provided
+ * {@link IsisConfiguration} using
+ * {@link PersistenceConstants#OID_GENERATOR_CLASS_NAME}. If no
+ * implementation is specified, then defaults to
* {@value PersistenceConstants#OID_GENERATOR_CLASS_NAME_DEFAULT}.
*/
protected OidGenerator createOidGenerator(final IsisConfiguration configuration) {
- final String oidGeneratorClassName =
- configuration.getString(PersistenceConstants.OID_GENERATOR_CLASS_NAME,
- PersistenceConstants.OID_GENERATOR_CLASS_NAME_DEFAULT);
+ final String oidGeneratorClassName = configuration.getString(PersistenceConstants.OID_GENERATOR_CLASS_NAME, PersistenceConstants.OID_GENERATOR_CLASS_NAME_DEFAULT);
return InstanceUtil.createInstance(oidGeneratorClassName, OidGenerator.class);
}
@@ -250,16 +251,15 @@ public abstract class PersistenceMechani
* Hook method to return a {@link DomainObjectContainer}.
*
* <p>
- * By default, looks up implementation from provided {@link IsisConfiguration} using
- * {@link PersistenceConstants#DOMAIN_OBJECT_CONTAINER_CLASS_NAME}. If no implementation is specified, then defaults
- * to {@value PersistenceConstants#DOMAIN_OBJECT_CONTAINER_NAME_DEFAULT}.
+ * By default, looks up implementation from provided
+ * {@link IsisConfiguration} using
+ * {@link PersistenceConstants#DOMAIN_OBJECT_CONTAINER_CLASS_NAME}. If no
+ * implementation is specified, then defaults to
+ * {@value PersistenceConstants#DOMAIN_OBJECT_CONTAINER_NAME_DEFAULT}.
*/
protected DomainObjectContainer createContainer(final IsisConfiguration configuration) {
- final String configuredClassName =
- configuration.getString(PersistenceConstants.DOMAIN_OBJECT_CONTAINER_CLASS_NAME,
- PersistenceConstants.DOMAIN_OBJECT_CONTAINER_NAME_DEFAULT);
- return InstanceUtil.createInstance(configuredClassName,
- PersistenceConstants.DOMAIN_OBJECT_CONTAINER_NAME_DEFAULT, DomainObjectContainer.class);
+ final String configuredClassName = configuration.getString(PersistenceConstants.DOMAIN_OBJECT_CONTAINER_CLASS_NAME, PersistenceConstants.DOMAIN_OBJECT_CONTAINER_NAME_DEFAULT);
+ return InstanceUtil.createInstance(configuredClassName, PersistenceConstants.DOMAIN_OBJECT_CONTAINER_NAME_DEFAULT, DomainObjectContainer.class);
}
// /////////////////////////////////////////////////////
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java Sun Jan 22 07:36:07 2012
@@ -68,17 +68,19 @@ import org.apache.log4j.Logger;
import com.google.inject.Inject;
/**
- * This class retrieves named {@link Installer}s from those loaded at creation, updating the {@link IsisConfiguration}
- * as it goes.
+ * This class retrieves named {@link Installer}s from those loaded at creation,
+ * updating the {@link IsisConfiguration} as it goes.
*
* <p>
- * A list of possible classes are read in from the resource file <tt>installer-registry.properties</tt>. Each installer
- * has a unique name (with respect to its type) that will be compared when one of this classes methods are called. These
- * are instantiated when requested.
+ * A list of possible classes are read in from the resource file
+ * <tt>installer-registry.properties</tt>. Each installer has a unique name
+ * (with respect to its type) that will be compared when one of this classes
+ * methods are called. These are instantiated when requested.
*
* <p>
- * Note that it <i>is</i> possible to use an {@link Installer} implementation even if it has not been registered in
- * <tt>installer-registry.properties</tt> : just specify the {@link Installer}'s fully qualified class name.
+ * Note that it <i>is</i> possible to use an {@link Installer} implementation
+ * even if it has not been registered in <tt>installer-registry.properties</tt>
+ * : just specify the {@link Installer}'s fully qualified class name.
*/
public class InstallerLookupDefault implements InstallerLookup {
@@ -86,9 +88,9 @@ public class InstallerLookupDefault impl
private final List<Installer> installerList = new ArrayList<Installer>();
-
/**
- * A mutable representation of the {@link IsisConfiguration configuration}, injected prior to {@link #init()}.
+ * A mutable representation of the {@link IsisConfiguration configuration},
+ * injected prior to {@link #init()}.
*
* <p>
*
@@ -144,7 +146,8 @@ public class InstallerLookupDefault impl
// ////////////////////////////////////////////////////////
/**
- * This method (and only this method) may be called prior to {@link #init() initialization}.
+ * This method (and only this method) may be called prior to {@link #init()
+ * initialization}.
*/
@Override
public Installer[] getInstallers(final Class<?> cls) {
@@ -180,65 +183,45 @@ public class InstallerLookupDefault impl
// ////////////////////////////////////////////////////////
@Override
- public AuthenticationManagerInstaller authenticationManagerInstaller(final String requested,
- final DeploymentType deploymentType) {
- return getInstaller(AuthenticationManagerInstaller.class, requested,
- SystemConstants.AUTHENTICATION_INSTALLER_KEY, deploymentType.isExploring()
- ? SystemConstants.AUTHENTICATION_EXPLORATION_DEFAULT : SystemConstants.AUTHENTICATION_DEFAULT);
+ public AuthenticationManagerInstaller authenticationManagerInstaller(final String requested, final DeploymentType deploymentType) {
+ return getInstaller(AuthenticationManagerInstaller.class, requested, SystemConstants.AUTHENTICATION_INSTALLER_KEY, deploymentType.isExploring() ? SystemConstants.AUTHENTICATION_EXPLORATION_DEFAULT : SystemConstants.AUTHENTICATION_DEFAULT);
}
@Override
- public AuthorizationManagerInstaller authorizationManagerInstaller(final String requested,
- final DeploymentType deploymentType) {
- return getInstaller(AuthorizationManagerInstaller.class, requested,
- SystemConstants.AUTHORIZATION_INSTALLER_KEY, !deploymentType.isProduction()
- ? SystemConstants.AUTHORIZATION_NON_PRODUCTION_DEFAULT : SystemConstants.AUTHORIZATION_DEFAULT);
+ public AuthorizationManagerInstaller authorizationManagerInstaller(final String requested, final DeploymentType deploymentType) {
+ return getInstaller(AuthorizationManagerInstaller.class, requested, SystemConstants.AUTHORIZATION_INSTALLER_KEY, !deploymentType.isProduction() ? SystemConstants.AUTHORIZATION_NON_PRODUCTION_DEFAULT : SystemConstants.AUTHORIZATION_DEFAULT);
}
@Override
public FixturesInstaller fixturesInstaller(final String requested) {
- return getInstaller(FixturesInstaller.class, requested, SystemConstants.FIXTURES_INSTALLER_KEY,
- SystemConstants.FIXTURES_INSTALLER_DEFAULT);
+ return getInstaller(FixturesInstaller.class, requested, SystemConstants.FIXTURES_INSTALLER_KEY, SystemConstants.FIXTURES_INSTALLER_DEFAULT);
}
@Override
public TemplateImageLoaderInstaller templateImageLoaderInstaller(final String requested) {
- return getInstaller(TemplateImageLoaderInstaller.class, requested, SystemConstants.IMAGE_LOADER_KEY,
- SystemConstants.IMAGE_LOADER_DEFAULT);
+ return getInstaller(TemplateImageLoaderInstaller.class, requested, SystemConstants.IMAGE_LOADER_KEY, SystemConstants.IMAGE_LOADER_DEFAULT);
}
@Override
- public PersistenceMechanismInstaller persistenceMechanismInstaller(final String requested,
- final DeploymentType deploymentType) {
- final String persistorDefault =
- deploymentType.isExploring() || deploymentType.isPrototyping()
- ? SystemConstants.OBJECT_PERSISTOR_NON_PRODUCTION_DEFAULT
- : SystemConstants.OBJECT_PERSISTOR_PRODUCTION_DEFAULT;
- return getInstaller(PersistenceMechanismInstaller.class, requested, SystemConstants.OBJECT_PERSISTOR_KEY,
- persistorDefault);
+ public PersistenceMechanismInstaller persistenceMechanismInstaller(final String requested, final DeploymentType deploymentType) {
+ final String persistorDefault = deploymentType.isExploring() || deploymentType.isPrototyping() ? SystemConstants.OBJECT_PERSISTOR_NON_PRODUCTION_DEFAULT : SystemConstants.OBJECT_PERSISTOR_PRODUCTION_DEFAULT;
+ return getInstaller(PersistenceMechanismInstaller.class, requested, SystemConstants.OBJECT_PERSISTOR_KEY, persistorDefault);
}
@Override
- public UserProfileStoreInstaller userProfilePersistenceMechanismInstaller(final String requested,
- final DeploymentType deploymentType) {
- final String profileStoreDefault =
- deploymentType.isExploring() || deploymentType.isPrototyping()
- ? SystemConstants.USER_PROFILE_STORE_NON_PRODUCTION_DEFAULT
- : SystemConstants.USER_PROFILE_STORE_PRODUCTION_DEFAULT;
- return getInstaller(UserProfileStoreInstaller.class, requested, SystemConstants.USER_PROFILE_STORE_KEY,
- profileStoreDefault);
+ public UserProfileStoreInstaller userProfilePersistenceMechanismInstaller(final String requested, final DeploymentType deploymentType) {
+ final String profileStoreDefault = deploymentType.isExploring() || deploymentType.isPrototyping() ? SystemConstants.USER_PROFILE_STORE_NON_PRODUCTION_DEFAULT : SystemConstants.USER_PROFILE_STORE_PRODUCTION_DEFAULT;
+ return getInstaller(UserProfileStoreInstaller.class, requested, SystemConstants.USER_PROFILE_STORE_KEY, profileStoreDefault);
}
@Override
public ObjectReflectorInstaller reflectorInstaller(final String requested) {
- return getInstaller(ObjectReflectorInstaller.class, requested, SystemConstants.REFLECTOR_KEY,
- SystemConstants.REFLECTOR_DEFAULT);
+ return getInstaller(ObjectReflectorInstaller.class, requested, SystemConstants.REFLECTOR_KEY, SystemConstants.REFLECTOR_DEFAULT);
}
@Override
public EmbeddedWebServerInstaller embeddedWebServerInstaller(final String requested) {
- return getInstaller(EmbeddedWebServerInstaller.class, requested, SystemConstants.WEBSERVER_KEY,
- SystemConstants.WEBSERVER_DEFAULT);
+ return getInstaller(EmbeddedWebServerInstaller.class, requested, SystemConstants.WEBSERVER_KEY, SystemConstants.WEBSERVER_DEFAULT);
}
/**
@@ -247,22 +230,24 @@ public class InstallerLookupDefault impl
* <p>
* This lookup is called in three different contexts:
* <ul>
- * <li>the <tt>IsisSystemFactoryUsingInstallers</tt> uses this to lookup the {@link PersistenceMechanismInstaller}
- * (may be a <tt>ProxyPersistor</tt>)</li>
- * <li>the <tt>IsisSystemFactoryUsingInstallers</tt> also uses this to lookup the {@link FacetDecoratorInstaller};
- * adds in remoting facets.</li>
- * <li>the <tt>IsisSystemUsingInstallers</tt> uses this to lookup the {@link AuthenticationManagerInstaller}.</li>
+ * <li>the <tt>IsisSystemFactoryUsingInstallers</tt> uses this to lookup the
+ * {@link PersistenceMechanismInstaller} (may be a <tt>ProxyPersistor</tt>)</li>
+ * <li>the <tt>IsisSystemFactoryUsingInstallers</tt> also uses this to
+ * lookup the {@link FacetDecoratorInstaller}; adds in remoting facets.</li>
+ * <li>the <tt>IsisSystemUsingInstallers</tt> uses this to lookup the
+ * {@link AuthenticationManagerInstaller}.</li>
* </ul>
*
* <p>
- * In addition to the usual {@link #mergeConfigurationFor(Installer) merging} of any {@link Installer} -specific
- * configuration files, this lookup also merges in any {@link ClientConnectionInstaller#getRemoteProperties() remote
- * properties} available.
+ * In addition to the usual {@link #mergeConfigurationFor(Installer)
+ * merging} of any {@link Installer} -specific configuration files, this
+ * lookup also merges in any
+ * {@link ClientConnectionInstaller#getRemoteProperties() remote properties}
+ * available.
*/
@Override
public ClientConnectionInstaller clientConnectionInstaller(final String requested) {
- return getInstaller(ClientConnectionInstaller.class, requested, SystemConstants.CLIENT_CONNECTION_KEY,
- SystemConstants.CLIENT_CONNECTION_DEFAULT);
+ return getInstaller(ClientConnectionInstaller.class, requested, SystemConstants.CLIENT_CONNECTION_KEY, SystemConstants.CLIENT_CONNECTION_DEFAULT);
}
@Override
@@ -290,8 +275,7 @@ public class InstallerLookupDefault impl
@Override
public ServicesInstaller servicesInstaller(final String requestedImplementationName) {
- return getInstaller(ServicesInstaller.class, requestedImplementationName,
- SystemConstants.SERVICES_INSTALLER_KEY, SystemConstants.SERVICES_INSTALLER_DEFAULT);
+ return getInstaller(ServicesInstaller.class, requestedImplementationName, SystemConstants.SERVICES_INSTALLER_KEY, SystemConstants.SERVICES_INSTALLER_DEFAULT);
}
// ////////////////////////////////////////////////////////
@@ -323,8 +307,7 @@ public class InstallerLookupDefault impl
}
return installer;
} catch (final InstanceCreationException e) {
- throw new InstanceCreationException("Specification error in "
- + IsisInstallerRegistry.INSTALLER_REGISTRY_FILE, e);
+ throw new InstanceCreationException("Specification error in " + IsisInstallerRegistry.INSTALLER_REGISTRY_FILE, e);
} catch (final UnavailableClassException e) {
return null;
}
@@ -341,8 +324,7 @@ public class InstallerLookupDefault impl
}
return installer;
} catch (final InstanceCreationException e) {
- throw new InstanceCreationException("Specification error in "
- + IsisInstallerRegistry.INSTALLER_REGISTRY_FILE, e);
+ throw new InstanceCreationException("Specification error in " + IsisInstallerRegistry.INSTALLER_REGISTRY_FILE, e);
} catch (final UnavailableClassException e) {
return null;
}
@@ -352,8 +334,7 @@ public class InstallerLookupDefault impl
// Helpers
// ////////////////////////////////////////////////////////
- private <T extends Installer> T getInstaller(final Class<T> requiredType, String reqImpl, final String key,
- final String defaultImpl) {
+ private <T extends Installer> T getInstaller(final Class<T> requiredType, String reqImpl, final String key, final String defaultImpl) {
if (reqImpl == null) {
reqImpl = getConfiguration().getString(key, defaultImpl);
}
@@ -362,8 +343,7 @@ public class InstallerLookupDefault impl
}
final T installer = getInstaller(requiredType, reqImpl);
if (installer == null) {
- throw new InstanceCreationException("Failed to load installer; named/class:'" + reqImpl + "' (of type "
- + requiredType.getName() + ")");
+ throw new InstanceCreationException("Failed to load installer; named/class:'" + reqImpl + "' (of type " + requiredType.getName() + ")");
}
return installer;
}
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerVersion.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerVersion.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerVersion.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerVersion.java Sun Jan 22 07:36:07 2012
@@ -62,8 +62,7 @@ public class InstallerVersion implements
private String findVersion(final String moduleId) {
try {
final String module = moduleId.replace(":", "/");
- final InputStream resourceAsStream =
- AboutIsis.class.getClassLoader().getResourceAsStream("META-INF/maven/" + module + "/pom.properties");
+ final InputStream resourceAsStream = AboutIsis.class.getClassLoader().getResourceAsStream("META-INF/maven/" + module + "/pom.properties");
if (resourceAsStream == null) {
return "no version";
}
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Data.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Data.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Data.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Data.java Sun Jan 22 07:36:07 2012
@@ -46,7 +46,8 @@ public class Data implements Encodable,
public Data(final DataInputExtended input) throws IOException {
this.className = input.readUTF();
- this.resolveState = input.readUTF(); // TODO: make ResolveState encodable?
+ this.resolveState = input.readUTF(); // TODO: make ResolveState
+ // encodable?
this.oid = input.readEncodable(Oid.class);
initialized();
}
@@ -67,7 +68,8 @@ public class Data implements Encodable,
// ///////////////////////////////////////////////////////
/**
- * Note: could be <tt>null</tt> if represents a {@link ResolveState#isValue() standalone} adapter.
+ * Note: could be <tt>null</tt> if represents a
+ * {@link ResolveState#isValue() standalone} adapter.
*/
public Oid getOid() {
return oid;
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/Memento.java Sun Jan 22 07:36:07 2012
@@ -53,8 +53,9 @@ import com.google.common.collect.Lists;
* Holds the state for the specified object in serializable form.
*
* <p>
- * This object is {@link Serializable} and can be passed over the network easily. Also for a persistent objects only the
- * reference's {@link Oid}s are held, avoiding the need for serializing the whole object graph.
+ * This object is {@link Serializable} and can be passed over the network
+ * easily. Also for a persistent objects only the reference's {@link Oid}s are
+ * held, avoiding the need for serializing the whole object graph.
*/
public class Memento implements Serializable {
@@ -96,15 +97,13 @@ public class Memento implements Serializ
transientObjects.add(adapter.getOid());
final ObjectSpecification cls = adapter.getSpecification();
final List<ObjectAssociation> fields = cls.getAssociations();
- final ObjectData data =
- new ObjectData(adapter.getOid(), adapter.getResolveState().name(), cls.getFullIdentifier());
+ final ObjectData data = new ObjectData(adapter.getOid(), adapter.getResolveState().name(), cls.getFullIdentifier());
for (int i = 0; i < fields.size(); i++) {
if (fields.get(i).isNotPersisted()) {
if (fields.get(i).isOneToManyAssociation()) {
continue;
}
- if (fields.get(i).containsFacet(PropertyOrCollectionAccessorFacet.class)
- && !fields.get(i).containsFacet(PropertySetterFacet.class)) {
+ if (fields.get(i).containsFacet(PropertyOrCollectionAccessorFacet.class) && !fields.get(i).containsFacet(PropertySetterFacet.class)) {
LOG.debug("ignoring not-settable field " + fields.get(i).getName());
continue;
}
@@ -190,8 +189,7 @@ public class Memento implements Serializ
return object;
}
- private void populateCollection(final ObjectAdapter collection, final CollectionData state,
- final ResolveState targetState) {
+ private void populateCollection(final ObjectAdapter collection, final CollectionData state, final ResolveState targetState) {
final ObjectAdapter[] initData = new ObjectAdapter[state.elements.length];
int i = 0;
for (final Data elementData : state.elements) {
@@ -228,11 +226,12 @@ public class Memento implements Serializ
}
/**
- * Updates the specified object (assuming it is the correct object for this memento) with the state held by this
- * memento.
+ * Updates the specified object (assuming it is the correct object for this
+ * memento) with the state held by this memento.
*
* @throws IllegalArgumentException
- * if the memento was created from different logical object to the one specified (i.e. its oid differs).
+ * if the memento was created from different logical object to
+ * the one specified (i.e. its oid differs).
*/
public void updateObject(final ObjectAdapter object) {
updateObject(object, state, ResolveState.RESOLVING);
@@ -241,9 +240,7 @@ public class Memento implements Serializ
private void updateObject(final ObjectAdapter object, final Data state, final ResolveState resolveState) {
final Object oid = object.getOid();
if (oid != null && !oid.equals(state.getOid())) {
- throw new IllegalArgumentException(
- "This memento can only be used to update the ObjectAdapter with the Oid " + state.getOid() + " but is "
- + oid);
+ throw new IllegalArgumentException("This memento can only be used to update the ObjectAdapter with the Oid " + state.getOid() + " but is " + oid);
} else {
if (!(state instanceof ObjectData)) {
@@ -270,8 +267,7 @@ public class Memento implements Serializ
} else {
final ObjectData od = (ObjectData) state;
if (od.containsField()) {
- throw new IsisException("Resolve state (for " + object
- + ") inconsistent with fact that data exists for fields");
+ throw new IsisException("Resolve state (for " + object + ") inconsistent with fact that data exists for fields");
}
}
}
@@ -284,8 +280,7 @@ public class Memento implements Serializ
if (field.isOneToManyAssociation()) {
continue;
}
- if (field.containsFacet(PropertyOrCollectionAccessorFacet.class)
- && !field.containsFacet(PropertySetterFacet.class)) {
+ if (field.containsFacet(PropertyOrCollectionAccessorFacet.class) && !field.containsFacet(PropertySetterFacet.class)) {
LOG.debug("ignoring not-settable field " + field.getName());
continue;
}
@@ -310,8 +305,7 @@ public class Memento implements Serializ
}
}
- private void updateOneToManyAssociation(final ObjectAdapter object, final OneToManyAssociation field,
- final CollectionData collectionData) {
+ private void updateOneToManyAssociation(final ObjectAdapter object, final OneToManyAssociation field, final CollectionData collectionData) {
final ObjectAdapter collection = field.get(object);
final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
final List<ObjectAdapter> original = Lists.newArrayList();
@@ -340,8 +334,7 @@ public class Memento implements Serializ
}
}
- private void updateOneToOneAssociation(final ObjectAdapter object, final OneToOneAssociation field,
- final Data fieldData) {
+ private void updateOneToOneAssociation(final ObjectAdapter object, final OneToOneAssociation field, final Data fieldData) {
if (fieldData == null) {
field.initAssociation(object, null);
} else {
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/StandaloneData.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/StandaloneData.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/StandaloneData.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/memento/StandaloneData.java Sun Jan 22 07:36:07 2012
@@ -82,8 +82,7 @@ public class StandaloneData extends Data
return;
}
- throw new IllegalArgumentException(
- "Object wrapped by standalone adapter is not serializable and its specificatoin does not have an EncodeableFacet");
+ throw new IllegalArgumentException("Object wrapped by standalone adapter is not serializable and its specificatoin does not have an EncodeableFacet");
}
public StandaloneData(final DataInputExtended input) throws IOException {
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/ConcurrencyException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/ConcurrencyException.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/ConcurrencyException.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/ConcurrencyException.java Sun Jan 22 07:36:07 2012
@@ -31,9 +31,7 @@ public class ConcurrencyException extend
private Oid source;
public ConcurrencyException(final ObjectAdapter object, final Version updated) {
- this(object.getVersion().getUser() + " changed " + object.titleString() + " at "
- + DateFormat.getDateTimeInstance().format(object.getVersion().getTime()) + "\n\n" + object.getVersion()
- + " ~ " + updated + "", object.getOid());
+ this(object.getVersion().getUser() + " changed " + object.titleString() + " at " + DateFormat.getDateTimeInstance().format(object.getVersion().getTime()) + "\n\n" + object.getVersion() + " ~ " + updated + "", object.getOid());
}
public ConcurrencyException(final String message, final Oid source) {
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/FixturesInstalledFlag.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/FixturesInstalledFlag.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/FixturesInstalledFlag.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/FixturesInstalledFlag.java Sun Jan 22 07:36:07 2012
@@ -24,7 +24,8 @@ import org.apache.isis.runtimes.dflt.run
/**
* For {@link PersistenceSessionFactory} implementations that can cache the
- * {@link PersistenceSession#isFixturesInstalled()} so is only called once per application scope.
+ * {@link PersistenceSession#isFixturesInstalled()} so is only called once per
+ * application scope.
*/
public interface FixturesInstalledFlag {
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceConstants.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceConstants.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceConstants.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceConstants.java Sun Jan 22 07:36:07 2012
@@ -34,36 +34,38 @@ import org.apache.isis.runtimes.dflt.run
public final class PersistenceConstants {
/**
- * Key used to lookup implementation of {@link ObjectAdapterFactory} in {@link IsisConfiguration}.
+ * Key used to lookup implementation of {@link ObjectAdapterFactory} in
+ * {@link IsisConfiguration}.
*/
public static final String ADAPTER_FACTORY_CLASS_NAME = ConfigurationConstants.ROOT + "persistor.adapter-factory";
public static final String ADAPTER_FACTORY_CLASS_NAME_DEFAULT = PojoAdapterFactory.class.getName();
/**
- * Key used to lookup implementation of {@link OidGenerator} in {@link IsisConfiguration}.
+ * Key used to lookup implementation of {@link OidGenerator} in
+ * {@link IsisConfiguration}.
*/
public static final String OID_GENERATOR_CLASS_NAME = ConfigurationConstants.ROOT + "persistor.oid-generator";
public static final String OID_GENERATOR_CLASS_NAME_DEFAULT = SimpleOidGenerator.class.getName();
/**
- * Key used to lookup implementation of {@link ObjectFactory} in {@link IsisConfiguration}.
+ * Key used to lookup implementation of {@link ObjectFactory} in
+ * {@link IsisConfiguration}.
*/
public static final String OBJECT_FACTORY_CLASS_NAME = ConfigurationConstants.ROOT + "persistor.object-factory";
- public static final String OBJECT_FACTORY_CLASS_NAME_DEFAULT =
- "org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory";
+ public static final String OBJECT_FACTORY_CLASS_NAME_DEFAULT = "org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory";
/**
- * Key used to lookup implementation of {@link ServicesInjector} in {@link IsisConfiguration}.
+ * Key used to lookup implementation of {@link ServicesInjector} in
+ * {@link IsisConfiguration}.
*/
- public static final String SERVICES_INJECTOR_CLASS_NAME = ConfigurationConstants.ROOT
- + "persistor.services-injector";
+ public static final String SERVICES_INJECTOR_CLASS_NAME = ConfigurationConstants.ROOT + "persistor.services-injector";
public static final String SERVICES_INJECTOR_CLASS_NAME_DEFAULT = ServicesInjectorDefault.class.getName();
/**
- * Key used to lookup implementation of {@link DomainObjectContainer} in {@link IsisConfiguration}.
+ * Key used to lookup implementation of {@link DomainObjectContainer} in
+ * {@link IsisConfiguration}.
*/
- public static final String DOMAIN_OBJECT_CONTAINER_CLASS_NAME = ConfigurationConstants.ROOT
- + "persistor.domain-object-container";
+ public static final String DOMAIN_OBJECT_CONTAINER_CLASS_NAME = ConfigurationConstants.ROOT + "persistor.domain-object-container";
public static final String DOMAIN_OBJECT_CONTAINER_NAME_DEFAULT = DomainObjectContainerDefault.class.getName();
private PersistenceConstants() {
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionAbstract.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionAbstract.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionAbstract.java Sun Jan 22 07:36:07 2012
@@ -91,10 +91,7 @@ public abstract class PersistenceSession
private State state;
- public PersistenceSessionAbstract(final PersistenceSessionFactory persistenceSessionFactory,
- final ObjectAdapterFactory adapterFactory, final ObjectFactory objectFactory,
- final ServicesInjector servicesInjector, final OidGenerator oidGenerator,
- final AdapterManagerExtended identityMap) {
+ public PersistenceSessionAbstract(final PersistenceSessionFactory persistenceSessionFactory, final ObjectAdapterFactory adapterFactory, final ObjectFactory objectFactory, final ServicesInjector servicesInjector, final OidGenerator oidGenerator, final AdapterManagerExtended identityMap) {
ensureThatArg(persistenceSessionFactory, is(not(nullValue())), "persistence session factory required");
@@ -131,7 +128,8 @@ public abstract class PersistenceSession
// ///////////////////////////////////////////////////////////////////////////
/**
- * Injects components, calls {@link #doOpen()}, and then creates service adapters.
+ * Injects components, calls {@link #doOpen()}, and then creates service
+ * adapters.
*
* @see #doOpen()
*/
@@ -202,7 +200,8 @@ public abstract class PersistenceSession
}
/**
- * Optional hook method called prior to creating service adapters for subclass to initialize its components.
+ * Optional hook method called prior to creating service adapters for
+ * subclass to initialize its components.
*/
protected void doOpen() {
}
@@ -220,8 +219,8 @@ public abstract class PersistenceSession
}
/**
- * Creates (or recreates following a {@link #testReset()}) {@link ObjectAdapter adapters} for the
- * {@link #serviceList}.
+ * Creates (or recreates following a {@link #testReset()})
+ * {@link ObjectAdapter adapters} for the {@link #serviceList}.
*/
private void createServiceAdapters() {
getTransactionManager().startTransaction();
@@ -297,11 +296,13 @@ public abstract class PersistenceSession
* Create a root or standalone {@link ObjectAdapter adapter}.
*
* <p>
- * The returned object will be initialised (had the relevant callback lifecycle methods invoked).
+ * The returned object will be initialised (had the relevant callback
+ * lifecycle methods invoked).
*
* <p>
- * TODO: this is the same as {@link RuntimeContextFromSession#createTransientInstance(ObjectSpecification)}; could
- * it be unified?
+ * TODO: this is the same as
+ * {@link RuntimeContextFromSession#createTransientInstance(ObjectSpecification)}
+ * ; could it be unified?
*/
@Override
public ObjectAdapter createInstance(final ObjectSpecification specification) {
@@ -398,8 +399,8 @@ public abstract class PersistenceSession
}
/**
- * Converts the {@link Query applib representation of a query} into the {@link PersistenceQuery NOF-internal
- * representation}.
+ * Converts the {@link Query applib representation of a query} into the
+ * {@link PersistenceQuery NOF-internal representation}.
*/
protected final PersistenceQuery createPersistenceQueryFor(final Query<?> query, final QueryCardinality cardinality) {
LOG.debug("createPersistenceQueryFor: " + query.getDescription());
@@ -421,10 +422,8 @@ public abstract class PersistenceSession
if (query instanceof QueryDefault) {
final QueryDefault<?> queryDefault = (QueryDefault<?>) query;
final String queryName = queryDefault.getQueryName();
- final Map<String, ObjectAdapter> argumentsAdaptersByParameterName =
- wrap(queryDefault.getArgumentsByParameterName());
- return new PersistenceQueryFindUsingApplibQueryDefault(noSpec, queryName, argumentsAdaptersByParameterName,
- cardinality);
+ final Map<String, ObjectAdapter> argumentsAdaptersByParameterName = wrap(queryDefault.getArgumentsByParameterName());
+ return new PersistenceQueryFindUsingApplibQueryDefault(noSpec, queryName, argumentsAdaptersByParameterName, cardinality);
}
// fallback; generic serializable applib query.
return new PersistenceQueryFindUsingApplibQuerySerializable(noSpec, query, cardinality);
@@ -435,7 +434,8 @@ public abstract class PersistenceSession
}
/**
- * Converts a map of pojos keyed by string to a map of adapters keyed by the same strings.
+ * Converts a map of pojos keyed by string to a map of adapters keyed by the
+ * same strings.
*/
private Map<String, ObjectAdapter> wrap(final Map<String, Object> argumentsByParameterName) {
final Map<String, ObjectAdapter> argumentsAdaptersByParameterName = new HashMap<String, ObjectAdapter>();
@@ -469,8 +469,10 @@ public abstract class PersistenceSession
}
/**
- * If {@link #isCheckObjectsForDirtyFlag() enabled}, will mark as {@link #objectChanged(ObjectAdapter) changed} any
- * {@link Dirtiable} objects that have manually been {@link Dirtiable#markDirty(ObjectAdapter) marked as dirty}.
+ * If {@link #isCheckObjectsForDirtyFlag() enabled}, will mark as
+ * {@link #objectChanged(ObjectAdapter) changed} any {@link Dirtiable}
+ * objects that have manually been
+ * {@link Dirtiable#markDirty(ObjectAdapter) marked as dirty}.
*/
@Override
public void objectChangedAllDirty() {
@@ -493,7 +495,8 @@ public abstract class PersistenceSession
}
/**
- * Set as {@link Dirtiable#clearDirty(ObjectAdapter) clean} any {@link Dirtiable} objects.
+ * Set as {@link Dirtiable#clearDirty(ObjectAdapter) clean} any
+ * {@link Dirtiable} objects.
*/
@Override
public synchronized void clearAllDirty() {
@@ -520,8 +523,9 @@ public abstract class PersistenceSession
// ///////////////////////////////////////////////////////////////////////////
/**
- * Returns the OID for the adapted service. This allows a service object to be given the same OID that it had when
- * it was created in a different session.
+ * Returns the OID for the adapted service. This allows a service object to
+ * be given the same OID that it had when it was created in a different
+ * session.
*/
protected abstract Oid getOidForService(String name);
@@ -533,7 +537,8 @@ public abstract class PersistenceSession
@Override
public ObjectAdapter getService(final String id) {
for (final Object service : servicesInjector.getRegisteredServices()) {
- // TODO this (ServiceUtil) uses reflection to access the service object; it should use the
+ // TODO this (ServiceUtil) uses reflection to access the service
+ // object; it should use the
// reflector, ie call allServices first and use the returned array
if (id.equals(ServiceUtil.id(service))) {
return getService(service);
@@ -580,8 +585,7 @@ public abstract class PersistenceSession
protected boolean isImmutable(final ObjectAdapter adapter) {
final ObjectSpecification noSpec = adapter.getSpecification();
- return ImmutableFacetUtils.isAlwaysImmutable(noSpec)
- || (ImmutableFacetUtils.isImmutableOncePersisted(noSpec) && adapter.isPersistent());
+ return ImmutableFacetUtils.isAlwaysImmutable(noSpec) || (ImmutableFacetUtils.isImmutableOncePersisted(noSpec) && adapter.isPersistent());
}
// ////////////////////////////////////////////////////////////////////
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegate.java Sun Jan 22 07:36:07 2012
@@ -23,13 +23,15 @@ import org.apache.isis.runtimes.dflt.run
import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSessionFactory;
/**
- * Creates a {@link PersistenceSession} on behalf of a {@link PersistenceSessionFactory}.
+ * Creates a {@link PersistenceSession} on behalf of a
+ * {@link PersistenceSessionFactory}.
*/
public interface PersistenceSessionFactoryDelegate {
/**
- * As per {@link PersistenceSessionFactory#createPersistenceSession()}, but passing a
- * {@link PersistenceSessionFactory} to act as the {@link PersistenceSession}'s
+ * As per {@link PersistenceSessionFactory#createPersistenceSession()}, but
+ * passing a {@link PersistenceSessionFactory} to act as the
+ * {@link PersistenceSession}'s
* {@link PersistenceSession#getPersistenceSessionFactory() owning factory}.
*/
PersistenceSession createPersistenceSession(PersistenceSessionFactory persistenceSessionFactory);
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionFactoryDelegating.java Sun Jan 22 07:36:07 2012
@@ -33,7 +33,8 @@ import org.apache.isis.runtimes.dflt.run
import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSessionFactory;
/**
- * Implementation that just delegates to a supplied {@link PersistenceSessionFactory}.
+ * Implementation that just delegates to a supplied
+ * {@link PersistenceSessionFactory}.
*/
public abstract class PersistenceSessionFactoryDelegating implements PersistenceSessionFactory, FixturesInstalledFlag {
@@ -44,8 +45,7 @@ public abstract class PersistenceSession
private Boolean fixturesInstalled;
- public PersistenceSessionFactoryDelegating(final DeploymentType deploymentType,
- final PersistenceSessionFactoryDelegate persistenceSessionFactoryDelegate) {
+ public PersistenceSessionFactoryDelegating(final DeploymentType deploymentType, final PersistenceSessionFactoryDelegate persistenceSessionFactoryDelegate) {
this.deploymentType = deploymentType;
this.persistenceSessionFactoryDelegate = persistenceSessionFactoryDelegate;
}
@@ -70,9 +70,12 @@ public abstract class PersistenceSession
ensureThatState(specificationLoader, is(notNullValue()));
ensureThatState(serviceList, is(notNullValue()));
- // a bit of a workaround, but required if anything in the metamodel (for example, a
- // ValueSemanticsProvider for a date value type) needs to use the Clock singleton
- // we do this after loading the services to allow a service to prime a different clock
+ // a bit of a workaround, but required if anything in the metamodel (for
+ // example, a
+ // ValueSemanticsProvider for a date value type) needs to use the Clock
+ // singleton
+ // we do this after loading the services to allow a service to prime a
+ // different clock
// implementation (eg to use an NTP time service).
if (!deploymentType.isProduction() && !Clock.isInitialized()) {
FixtureClock.initialize();
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionLogger.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionLogger.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionLogger.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistenceSessionLogger.java Sun Jan 22 07:36:07 2012
@@ -61,8 +61,7 @@ public class PersistenceSessionLogger ex
}
@Override
- public ObjectAdapter findInstances(final Query query, final QueryCardinality cardinality)
- throws UnsupportedFindException {
+ public ObjectAdapter findInstances(final Query query, final QueryCardinality cardinality) throws UnsupportedFindException {
log("find instances matching " + query.getDescription());
return underlying.findInstances(query, cardinality);
}
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorUtil.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorUtil.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorUtil.java Sun Jan 22 07:36:07 2012
@@ -43,8 +43,9 @@ public class PersistorUtil {
}
/**
- * Marks the specified object as loaded: resolved, partly resolve or updated as specified by the second parameter.
- * Attempting to specify any other state throws a run time exception.
+ * Marks the specified object as loaded: resolved, partly resolve or updated
+ * as specified by the second parameter. Attempting to specify any other
+ * state throws a run time exception.
*/
public static void end(final ObjectAdapter object) {
final ResolveState endState = object.getResolveState().getEndState();
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adapterfactory/pojo/PojoAdapter.java Sun Jan 22 07:36:07 2012
@@ -81,13 +81,19 @@ public class PojoAdapter extends Instanc
if (LOG.isDebugEnabled()) {
// be careful not to touch the pojo
- // this method is called by the FinalizerThread so could be called at any time.
- // for Hibernate-based object stores (and similar), it may no longer be valid to
- // touch the pojo (although arguably, closing the session should detach these pojos)
-
- // we also mustn't touch the adapter's specification. That's because the loading
- // of specifications isn't threadsafe, due to the way in which we put non-introspected
- // specifications into the SpecificationCache to prevent infinite loops.
+ // this method is called by the FinalizerThread so could be called
+ // at any time.
+ // for Hibernate-based object stores (and similar), it may no longer
+ // be valid to
+ // touch the pojo (although arguably, closing the session should
+ // detach these pojos)
+
+ // we also mustn't touch the adapter's specification. That's because
+ // the loading
+ // of specifications isn't threadsafe, due to the way in which we
+ // put non-introspected
+ // specifications into the SpecificationCache to prevent infinite
+ // loops.
// better safe than sorry, though
// LOG.debug("finalizing pojo, oid: " + getOid());
@@ -124,8 +130,9 @@ public class PojoAdapter extends Instanc
}
/**
- * Sometimes it is necessary to manage the replacement of the underlying domain object (by another component such as
- * an object store). This method allows the adapter to be kept while the domain object is replaced.
+ * Sometimes it is necessary to manage the replacement of the underlying
+ * domain object (by another component such as an object store). This method
+ * allows the adapter to be kept while the domain object is replaced.
*/
@Override
public void replacePojo(final Object pojo) {
@@ -145,18 +152,18 @@ public class PojoAdapter extends Instanc
public void changeState(final ResolveState newState) {
final boolean validToChangeTo = resolveState.isValidToChangeTo(newState);
- // don't call toString() since that could hit titleString() and we might be
+ // don't call toString() since that could hit titleString() and we might
+ // be
// in the process of transitioning to ghost
- Assert.assertTrue(
- "oid= " + this.getOid() + "; can't change from " + resolveState.name() + " to " + newState.name(),
- validToChangeTo);
+ Assert.assertTrue("oid= " + this.getOid() + "; can't change from " + resolveState.name() + " to " + newState.name(), validToChangeTo);
if (LOG.isTraceEnabled()) {
String oidString;
if (oid == null) {
oidString = "";
} else {
- // don't call toString() in case in process of transitioning to ghost
+ // don't call toString() in case in process of transitioning to
+ // ghost
oidString = "for " + this.getOid() + " ";
}
LOG.trace(oidString + "changing resolved state to " + newState.name());
@@ -223,7 +230,6 @@ public class PojoAdapter extends Instanc
}
}
-
// ///////////////////////////////////////////////////////////////////
// Version
// ///////////////////////////////////////////////////////////////////
@@ -260,9 +266,11 @@ public class PojoAdapter extends Instanc
* Returns the title from the underlying business object.
*
* <p>
- * If the object has not yet been resolved the specification will be asked for a unresolved title, which could of
- * been persisted by the persistence mechanism. If either of the above provides null as the title then this method
- * will return a title relating to the name of the object type, e.g. "A Customer", "A Product".
+ * If the object has not yet been resolved the specification will be asked
+ * for a unresolved title, which could of been persisted by the persistence
+ * mechanism. If either of the above provides null as the title then this
+ * method will return a title relating to the name of the object type, e.g.
+ * "A Customer", "A Product".
*/
@Override
public String titleString() {
@@ -305,25 +313,25 @@ public class PojoAdapter extends Instanc
final ObjectSpecification elementSpecification = getElementSpecification();
if (elementSpecification == null || elementSpecification.getFullIdentifier().equals(Object.class.getName())) {
switch (size) {
- case -1:
- return "Objects";
- case 0:
- return "No objects";
- case 1:
- return "1 object";
- default:
- return size + " objects";
+ case -1:
+ return "Objects";
+ case 0:
+ return "No objects";
+ case 1:
+ return "1 object";
+ default:
+ return size + " objects";
}
} else {
switch (size) {
- case -1:
- return elementSpecification.getPluralName();
- case 0:
- return "No " + elementSpecification.getPluralName();
- case 1:
- return "1 " + elementSpecification.getSingularName();
- default:
- return size + " " + elementSpecification.getPluralName();
+ case -1:
+ return elementSpecification.getPluralName();
+ case 0:
+ return "No " + elementSpecification.getPluralName();
+ case 1:
+ return "1 " + elementSpecification.getSingularName();
+ default:
+ return size + " " + elementSpecification.getPluralName();
}
}
}
@@ -333,7 +341,8 @@ public class PojoAdapter extends Instanc
final ToString str = new ToString(this);
toString(str);
- // don't do title of any entities. For persistence entities, might forces an unwanted resolve
+ // don't do title of any entities. For persistence entities, might
+ // forces an unwanted resolve
// of the object. For transient objects, may not be fully initialized.
str.append("pojo-toString", pojo.toString());
@@ -409,11 +418,12 @@ public class PojoAdapter extends Instanc
// ///////////////////////////////////////////////////////////////////
/**
- * Guaranteed to be called whenever this object is known to have changed (specifically, by the
- * <tt>ObjectStorePersistor</tt>).
+ * Guaranteed to be called whenever this object is known to have changed
+ * (specifically, by the <tt>ObjectStorePersistor</tt>).
*
* <p>
- * This implementation does nothing, but subclasses (for example <tt>PojoAdapterX</tt>) might provide listeners.
+ * This implementation does nothing, but subclasses (for example
+ * <tt>PojoAdapterX</tt>) might provide listeners.
*/
@Override
public void fireChangedEvent() {
Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adaptermanager/AdapterManagerBackdoor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adaptermanager/AdapterManagerBackdoor.java?rev=1234456&r1=1234455&r2=1234456&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adaptermanager/AdapterManagerBackdoor.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/persistence/adaptermanager/AdapterManagerBackdoor.java Sun Jan 22 07:36:07 2012
@@ -24,11 +24,13 @@ import org.apache.isis.runtimes.dflt.run
import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSessionHydrator;
/**
- * Not part of the standard API, but used by the <tt>MemoryObjectStore</tt> to add pre-existing {@link ObjectAdapter
- * adapter}s straight into the identity maps.
+ * Not part of the standard API, but used by the <tt>MemoryObjectStore</tt> to
+ * add pre-existing {@link ObjectAdapter adapter}s straight into the identity
+ * maps.
*
* <p>
- * Don't think this is used anymore; see instead {@link PersistenceSessionHydrator}.
+ * Don't think this is used anymore; see instead
+ * {@link PersistenceSessionHydrator}.
*/
public interface AdapterManagerBackdoor extends AdapterManager {