public class DomainObjectContainerDefault extends Object implements org.apache.isis.applib.DomainObjectContainer, QuerySubmitterAware, ObjectDirtierAware, DomainObjectServicesAware, ObjectPersistorAware, SpecificationLoaderAware, AuthenticationSessionProviderAware, AdapterManagerAware, LocalizationProviderAware, org.apache.isis.applib.services.exceprecog.ExceptionRecognizer
| Constructor and Description |
|---|
DomainObjectContainerDefault() |
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
allInstances(Class<T> type,
long... range) |
<T> List<T> |
allMatches(Class<T> cls,
org.apache.isis.applib.filter.Filter<? super T> filter,
long... range)
Deprecated.
|
<T> List<T> |
allMatches(Class<T> cls,
com.google.common.base.Predicate<? super T> predicate,
long... range) |
<T> List<T> |
allMatches(Class<T> type,
String title,
long... range) |
<T> List<T> |
allMatches(Class<T> type,
T pattern,
long... range) |
<T> List<T> |
allMatches(org.apache.isis.applib.query.Query<T> query) |
void |
commit() |
protected ObjectAdapter |
doCreateTransientInstance(ObjectSpecification spec)
Factored out as a potential hook method for subclasses.
|
protected ObjectAdapter |
doCreateViewModelInstance(ObjectSpecification spec,
String memento) |
<T> T |
firstMatch(Class<T> cls,
org.apache.isis.applib.filter.Filter<T> filter)
Deprecated.
|
<T> T |
firstMatch(Class<T> cls,
com.google.common.base.Predicate<T> predicate) |
<T> T |
firstMatch(Class<T> type,
String title) |
<T> T |
firstMatch(Class<T> type,
T pattern) |
<T> T |
firstMatch(org.apache.isis.applib.query.Query<T> query) |
boolean |
flush() |
protected AdapterManager |
getAdapterManager() |
protected AuthenticationSessionProvider |
getAuthenticationSessionProvider() |
protected DomainObjectServices |
getDomainObjectServices() |
protected ObjectDirtier |
getObjectDirtier() |
protected ObjectPersistor |
getObjectPersistor() |
String |
getProperty(String name) |
String |
getProperty(String name,
String defaultValue) |
List<String> |
getPropertyNames() |
protected QuerySubmitter |
getQuerySubmitter() |
protected SpecificationLoader |
getSpecificationLookup() |
org.apache.isis.applib.security.UserMemento |
getUser() |
void |
informUser(String message) |
void |
init(Map<String,String> properties) |
<T> T |
injectServicesInto(T domainObject) |
boolean |
isPersistent(Object domainObject) |
boolean |
isValid(Object domainObject) |
<T> T |
newAggregatedInstance(Object parent,
Class<T> ofClass) |
<T> T |
newInstance(Class<T> ofClass,
Object object)
Returns a new instance of the specified class that has the same persisted
state as the specified object.
|
<T> T |
newPersistentInstance(Class<T> ofClass)
Returns a new instance of the specified class that will have been
persisted.
|
<T> T |
newTransientInstance(Class<T> ofClass) |
<T extends org.apache.isis.applib.ViewModel> |
newViewModelInstance(Class<T> ofClass,
String memento) |
void |
objectChanged(Object object) |
void |
persist(Object domainObject) |
void |
persistIfNotAlready(Object object) |
void |
raiseError(String message) |
String |
recognize(Throwable ex)
Framework-provided implementation of
ExceptionRecognizer,
which will automatically recognize any RecoverableExceptions or
any ConcurrencyExceptions. |
void |
remove(Object persistentObject) |
void |
removeIfNotAlready(Object object) |
void |
resolve(Object parent) |
void |
resolve(Object parent,
Object field) |
void |
setAdapterManager(AdapterManager adapterManager) |
void |
setAuthenticationSessionProvider(AuthenticationSessionProvider authenticationSessionProvider) |
void |
setDomainObjectServices(DomainObjectServices domainObjectServices) |
void |
setLocalizationProvider(LocalizationProvider localizationProvider) |
void |
setObjectDirtier(ObjectDirtier objectDirtier) |
void |
setObjectPersistor(ObjectPersistor objectPersistor) |
void |
setQuerySubmitter(QuerySubmitter querySubmitter) |
void |
setSpecificationLookup(SpecificationLoader specificationLookup) |
void |
shutdown() |
String |
titleOf(Object domainObject) |
<T> T |
uniqueMatch(Class<T> type,
org.apache.isis.applib.filter.Filter<T> filter)
Deprecated.
|
<T> T |
uniqueMatch(Class<T> type,
com.google.common.base.Predicate<T> predicate) |
<T> T |
uniqueMatch(Class<T> type,
String title) |
<T> T |
uniqueMatch(Class<T> type,
T pattern) |
<T> T |
uniqueMatch(org.apache.isis.applib.query.Query<T> query) |
String |
validate(Object domainObject) |
void |
warnUser(String message) |
public DomainObjectContainerDefault()
public String titleOf(Object domainObject)
titleOf in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T newTransientInstance(Class<T> ofClass)
newTransientInstance in interface org.apache.isis.applib.DomainObjectContainerpublic <T extends org.apache.isis.applib.ViewModel> T newViewModelInstance(Class<T> ofClass, String memento)
newViewModelInstance in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T newAggregatedInstance(Object parent, Class<T> ofClass)
newAggregatedInstance in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T newPersistentInstance(Class<T> ofClass)
newPersistentInstance in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T newInstance(Class<T> ofClass, Object object)
newInstance in interface org.apache.isis.applib.DomainObjectContainerprotected ObjectAdapter doCreateTransientInstance(ObjectSpecification spec)
protected ObjectAdapter doCreateViewModelInstance(ObjectSpecification spec, String memento)
public void remove(Object persistentObject)
remove in interface org.apache.isis.applib.DomainObjectContainerpublic void removeIfNotAlready(Object object)
removeIfNotAlready in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T injectServicesInto(T domainObject)
injectServicesInto in interface org.apache.isis.applib.DomainObjectContainerpublic void resolve(Object parent)
resolve in interface org.apache.isis.applib.DomainObjectContainerpublic void resolve(Object parent, Object field)
resolve in interface org.apache.isis.applib.DomainObjectContainerpublic void objectChanged(Object object)
objectChanged in interface org.apache.isis.applib.DomainObjectContainerpublic boolean flush()
flush in interface org.apache.isis.applib.DomainObjectContainerpublic void commit()
commit in interface org.apache.isis.applib.DomainObjectContainerpublic boolean isValid(Object domainObject)
isValid in interface org.apache.isis.applib.DomainObjectContainerpublic String validate(Object domainObject)
validate in interface org.apache.isis.applib.DomainObjectContainerpublic boolean isPersistent(Object domainObject)
isPersistent in interface org.apache.isis.applib.DomainObjectContainerpublic void persist(Object domainObject)
persist in interface org.apache.isis.applib.DomainObjectContainerpublic void persistIfNotAlready(Object object)
persistIfNotAlready in interface org.apache.isis.applib.DomainObjectContainerpublic org.apache.isis.applib.security.UserMemento getUser()
getUser in interface org.apache.isis.applib.DomainObjectContainerpublic String getProperty(String name)
getProperty in interface org.apache.isis.applib.DomainObjectContainerpublic String getProperty(String name, String defaultValue)
getProperty in interface org.apache.isis.applib.DomainObjectContainerpublic List<String> getPropertyNames()
getPropertyNames in interface org.apache.isis.applib.DomainObjectContainerpublic void informUser(String message)
informUser in interface org.apache.isis.applib.DomainObjectContainerpublic void raiseError(String message)
raiseError in interface org.apache.isis.applib.DomainObjectContainerpublic void warnUser(String message)
warnUser in interface org.apache.isis.applib.DomainObjectContainerpublic <T> List<T> allInstances(Class<T> type, long... range)
allInstances in interface org.apache.isis.applib.DomainObjectContainerpublic <T> List<T> allMatches(Class<T> cls, com.google.common.base.Predicate<? super T> predicate, long... range)
allMatches in interface org.apache.isis.applib.DomainObjectContainer@Deprecated public <T> List<T> allMatches(Class<T> cls, org.apache.isis.applib.filter.Filter<? super T> filter, long... range)
allMatches in interface org.apache.isis.applib.DomainObjectContainerpublic <T> List<T> allMatches(Class<T> type, T pattern, long... range)
allMatches in interface org.apache.isis.applib.DomainObjectContainerpublic <T> List<T> allMatches(Class<T> type, String title, long... range)
allMatches in interface org.apache.isis.applib.DomainObjectContainerpublic <T> List<T> allMatches(org.apache.isis.applib.query.Query<T> query)
allMatches in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T firstMatch(Class<T> cls, com.google.common.base.Predicate<T> predicate)
firstMatch in interface org.apache.isis.applib.DomainObjectContainer@Deprecated public <T> T firstMatch(Class<T> cls, org.apache.isis.applib.filter.Filter<T> filter)
firstMatch in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T firstMatch(Class<T> type, T pattern)
firstMatch in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T firstMatch(Class<T> type, String title)
firstMatch in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T firstMatch(org.apache.isis.applib.query.Query<T> query)
firstMatch in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T uniqueMatch(Class<T> type, com.google.common.base.Predicate<T> predicate)
uniqueMatch in interface org.apache.isis.applib.DomainObjectContainer@Deprecated public <T> T uniqueMatch(Class<T> type, org.apache.isis.applib.filter.Filter<T> filter)
uniqueMatch in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T uniqueMatch(Class<T> type, T pattern)
uniqueMatch in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T uniqueMatch(Class<T> type, String title)
uniqueMatch in interface org.apache.isis.applib.DomainObjectContainerpublic <T> T uniqueMatch(org.apache.isis.applib.query.Query<T> query)
uniqueMatch in interface org.apache.isis.applib.DomainObjectContainerpublic String recognize(Throwable ex)
ExceptionRecognizer,
which will automatically recognize any RecoverableExceptions or
any ConcurrencyExceptions.recognize in interface org.apache.isis.applib.services.exceprecog.ExceptionRecognizer@PostConstruct public void init(Map<String,String> properties)
init in interface org.apache.isis.applib.services.exceprecog.ExceptionRecognizer@PreDestroy public void shutdown()
shutdown in interface org.apache.isis.applib.services.exceprecog.ExceptionRecognizerprotected QuerySubmitter getQuerySubmitter()
public void setQuerySubmitter(QuerySubmitter querySubmitter)
setQuerySubmitter in interface QuerySubmitterAwareprotected DomainObjectServices getDomainObjectServices()
public void setDomainObjectServices(DomainObjectServices domainObjectServices)
setDomainObjectServices in interface DomainObjectServicesAwareprotected SpecificationLoader getSpecificationLookup()
public void setSpecificationLookup(SpecificationLoader specificationLookup)
setSpecificationLookup in interface SpecificationLoaderAwareprotected AuthenticationSessionProvider getAuthenticationSessionProvider()
public void setAuthenticationSessionProvider(AuthenticationSessionProvider authenticationSessionProvider)
setAuthenticationSessionProvider in interface AuthenticationSessionProviderAwareprotected AdapterManager getAdapterManager()
public void setAdapterManager(AdapterManager adapterManager)
setAdapterManager in interface AdapterManagerAwareprotected ObjectDirtier getObjectDirtier()
public void setObjectDirtier(ObjectDirtier objectDirtier)
setObjectDirtier in interface ObjectDirtierAwareprotected ObjectPersistor getObjectPersistor()
public void setObjectPersistor(ObjectPersistor objectPersistor)
setObjectPersistor in interface ObjectPersistorAwarepublic void setLocalizationProvider(LocalizationProvider localizationProvider)
setLocalizationProvider in interface LocalizationProviderAwareCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.