|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.component.base.AbstractLoggableObject
net.sf.mmm.util.xml.base.jaxb.JaxbBeanHolderImpl<VIEW,BEAN>
VIEW - is the generic type for the API of the JAXB
bean.BEAN - is the generic type for the implementation of the
JAXB bean.public class JaxbBeanHolderImpl<VIEW,BEAN extends VIEW>
This is the implementation of JaxbBeanHolder.
| Field Summary | |
|---|---|
private boolean |
allowSave
|
private BEAN |
bean
|
private XmlBeanMapper<BEAN> |
beanMapper
The XmlBeanMapper. |
private DataResource |
dataResource
The DataResource where the bean was loaded from. |
private Date |
modificationDate
|
| Constructor Summary | |
|---|---|
JaxbBeanHolderImpl(BEAN bean,
DataResource resource,
XmlBeanMapper<BEAN> beanMapper)
The constructor. |
|
JaxbBeanHolderImpl(BEAN bean,
DataResource resource,
XmlBeanMapper<BEAN> beanMapper,
boolean allowSave)
The constructor. |
|
| Method Summary | |
|---|---|
void |
flush()
|
BEAN |
getBean()
This method gets the current JAXB bean. |
protected DataResource |
getDataResource()
This method gets the DataResource where the bean
was loaded from. |
boolean |
isAllowSave()
This method determines if this implementation allows to save. |
boolean |
refresh()
This method will reload the configuration if it has
changed. |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final DataResource dataResource
DataResource where the bean was loaded from.
private final XmlBeanMapper<BEAN extends VIEW> beanMapper
XmlBeanMapper.
private final boolean allowSave
isAllowSave()private BEAN extends VIEW bean
getBean()private Date modificationDate
refresh()| Constructor Detail |
|---|
public JaxbBeanHolderImpl(BEAN bean,
DataResource resource,
XmlBeanMapper<BEAN> beanMapper)
bean - is the JAXB bean.resource - is the resource.beanMapper - is the XmlBeanMapper used for flush()
and refresh().
public JaxbBeanHolderImpl(BEAN bean,
DataResource resource,
XmlBeanMapper<BEAN> beanMapper,
boolean allowSave)
bean - is the JAXB bean.resource - is the resource.beanMapper - is the XmlBeanMapper used for flush()
and refresh().allowSave - - see isAllowSave().| Method Detail |
|---|
public boolean isAllowSave()
save.
true if saving is allowed,
false otherwise.public BEAN getBean()
getBean in interface JaxbBeanHolder<VIEW>protected DataResource getDataResource()
DataResource where the bean
was loaded from.
DataResource.public void flush()
flush in interface Flushablepublic boolean refresh()
configuration if it has
changed.
This method refreshes the given object. This can be anything from reloading
configuration to rebuilding the internal state. An invocation of this
method may be expensive and should only be invoked as needed. The
implementation of this method should be thread-safe if the object itself is
to be used by separate consumers at all.
refresh in interface Refreshablerefresh in interface JaxbBeanHolder<VIEW>true if something has changed, false
otherwise. If the implementation can not determine the change it
should return true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||