[New] Added StrolchTransaction.lockAndGetConfiguration()
This commit is contained in:
parent
6787214cfe
commit
668181e46b
|
@ -739,6 +739,12 @@ public abstract class AbstractTransaction implements StrolchTransaction {
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resource lockAndGetConfiguration() {
|
||||||
|
lock(Resource.locatorFor(TYPE_CONFIGURATION, RES_CONFIGURATION));
|
||||||
|
return getConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Order getOrderTemplate(String type) {
|
public Order getOrderTemplate(String type) {
|
||||||
return getOrderTemplate(type, false);
|
return getOrderTemplate(type, false);
|
||||||
|
|
|
@ -800,6 +800,20 @@ public interface StrolchTransaction extends AutoCloseable {
|
||||||
*/
|
*/
|
||||||
Resource getConfiguration();
|
Resource getConfiguration();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Returns the {@link Resource} with the type {@link StrolchConstants#TYPE_CONFIGURATION} and id {@link
|
||||||
|
* StrolchConstants#RES_CONFIGURATION}.</p>
|
||||||
|
*
|
||||||
|
* <p>Should the configuration resource not exist, then it will be created without any parameters, as {@link
|
||||||
|
* Resource#getBoolean(String)} methods et. al. will then just return empty values for their corresponding
|
||||||
|
* types.</p>
|
||||||
|
*
|
||||||
|
* <p>This method first locks the resource's locator, so that we can perform a read lock</p>
|
||||||
|
*
|
||||||
|
* @return the configuration resource
|
||||||
|
*/
|
||||||
|
Resource lockAndGetConfiguration();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Returns a copy of the {@link Order} of Type {@link StrolchModelConstants#TEMPLATE} with the given type as id, or
|
* Returns a copy of the {@link Order} of Type {@link StrolchModelConstants#TEMPLATE} with the given type as id, or
|
||||||
|
|
Loading…
Reference in New Issue