private Lock acquireLock( LockFeature request, LockManager manager, long expiryInMilliseconds ) throws OWSException { // default: lock all boolean lockAll = true; if ( request.getLockAll() != null ) { lockAll = request.getLockAll(); } List<Query> fsQueries = null; try { QueryAnalyzer queryAnalyzer = new QueryAnalyzer( request.getQueries(), master, master.getStoreManager(), master.getCheckAreaOfUse() ); fsQueries = queryAnalyzer.getQueries().get( master.getStoreManager().getStores()[0] ); } catch ( Exception e ) { throw new OWSException( "Cannot determine feature store queries for locking: " + e.getMessage(), NO_APPLICABLE_CODE ); } Lock lock = null; try { lock = manager.acquireLock( fsQueries, lockAll, expiryInMilliseconds ); } catch ( OWSException e ) { LOG.debug( e.getMessage(), e ); throw new OWSException( e.getMessage(), "CannotLockAllFeatures" ); } catch ( Exception e ) { LOG.debug( e.getMessage(), e ); throw new OWSException( "Cannot acquire lock: " + e.getMessage(), NO_APPLICABLE_CODE ); } return lock; }
/** * Creates a new {@link GmlFormat} instance with default behaviour for the specified GML version. * * @param master * service that uses this format, must not be <code>null</code> * @param gmlVersion * GML version, must not be <code>null</code> */ public GmlFormat( WebFeatureService master, GMLVersion gmlVersion ) { this.master = master; this.options = new GmlFormatOptions( gmlVersion, null, null, null, false, false, master.getQueryMaxFeatures(), master.getCheckAreaOfUse(), null, null, gmlVersion.getMimeType(), false, null, null, master.isEnableResponsePaging() ); this.dftHandler = new GmlDescribeFeatureTypeHandler( this ); this.gfHandler = new GmlGetFeatureHandler( this ); this.gpvHandler = new GmlGetPropertyValueHandler( this ); this.ggoHandler = new GmlGetGmlObjectHandler( this ); }
boolean checkAreaOfUse = master.getCheckAreaOfUse();