public boolean isMaxResourcesConstraint() {
return Registry.getTransactionService()
.runOnAnotherReadOnlyTransaction(new IOnTransaction<Boolean>() {
@Override
public Boolean execute() {
Configuration configuration = Registry
.getConfigurationDAO().getConfiguration();
if (configuration == null) {
return true;
}
Integer maxResources = configuration.getMaxResources();
if (maxResources != null && maxResources > 0) {
List<Resource> resources = Registry
.getResourceDAO().findAll();
int resourcesNumber = resources.size();
if (isNewObject()) {