@Override public <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric resourceGeneric, String resourceSpecific, int iOperation) { checkOpenness(); internal.checkSecurity(resourceGeneric, resourceSpecific, iOperation); return (DB) this; }
@Override public <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object... iResourcesSpecific) { checkOpenness(); internal.checkSecurity(iResourceGeneric, iOperation, iResourcesSpecific); return (DB) this; }
@Override public Collection<OClass> getClasses() { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_READ); return new HashSet<OClass>(classes.values()); }
@Override public <DB extends ODatabaseDocument> DB checkSecurity(String iResourceGeneric, int iOperation, Object iResourceSpecific) { checkOpenness(); internal.checkSecurity(iResourceGeneric, iOperation, iResourceSpecific); return (DB) this; }
@Override public <DB extends ODatabaseDocument> DB checkSecurity(ORule.ResourceGeneric iResourceGeneric, int iOperation, Object iResourceSpecific) { checkOpenness(); internal.checkSecurity(iResourceGeneric, iOperation, iResourceSpecific); return (DB) this; }
@Override public <DB extends ODatabaseDocument> DB checkSecurity(String iResource, int iOperation) { checkOpenness(); internal.checkSecurity(iResource, iOperation); return (DB) this; }
public Collection<OClass> getClasses(ODatabaseDocumentInternal database) { database.checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_READ); acquireSchemaReadLock(); try { return new HashSet<OClass>(classes.values()); } finally { releaseSchemaReadLock(); } }
public OCommandExecutorAbstract init(final OCommandRequestText iRequest) { getDatabase().checkSecurity(ORule.ResourceGeneric.COMMAND, ORole.PERMISSION_READ); parserText = iRequest.getText().trim(); parserTextUpperCase = upperCase(parserText); return this; }
protected void setRegexpInternal(final String regexp) { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); acquireSchemaWriteLock(); try { this.regexp = regexp; } finally { releaseSchemaWriteLock(); } }
protected void setOverSizeInternal(ODatabaseDocumentInternal database, final float overSize) { database.checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); acquireSchemaWriteLock(); try { checkEmbedded(); this.overSize = overSize; } finally { releaseSchemaWriteLock(); } }
public Map<String, OProperty> propertiesMap() { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_READ); acquireSchemaReadLock(); try { final Map<String, OProperty> props = new HashMap<String, OProperty>(20); propertiesMap(props); return props; } finally { releaseSchemaReadLock(); } }
protected void setNotNullInternal(final boolean isNotNull) { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); acquireSchemaWriteLock(); try { notNull = isNotNull; } finally { releaseSchemaWriteLock(); } }
/** * Execute the ALTER DATABASE. */ public Object execute(final Map<Object, Object> iArgs) { if (attribute == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); final ODatabaseDocumentInternal database = getDatabase(); database.checkSecurity(ORule.ResourceGeneric.DATABASE, ORole.PERMISSION_UPDATE); database.setInternal(attribute, value); return null; }
public Collection<OProperty> properties() { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_READ); acquireSchemaReadLock(); try { final Collection<OProperty> props = new ArrayList<OProperty>(); properties(props); return props; } finally { releaseSchemaReadLock(); } }
@Override public Collection<OProperty> getIndexedProperties() { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_READ); acquireSchemaReadLock(); try { Collection<OProperty> indexedProps = new HashSet<OProperty>(); getIndexedProperties(indexedProps); return indexedProps; } finally { releaseSchemaReadLock(); } }
protected void setLinkedClassInternal(final OClass iLinkedClass) { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); acquireSchemaWriteLock(); try { checkEmbedded(); this.linkedClass = iLinkedClass; } finally { releaseSchemaWriteLock(); } }
protected void setDescriptionInternal(final String iDescription) { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); acquireSchemaWriteLock(); try { checkEmbedded(); this.description = iDescription; } finally { releaseSchemaWriteLock(); } }
protected void setStrictModeInternal(final boolean iStrict) { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); acquireSchemaWriteLock(); try { checkEmbedded(); this.strictMode = iStrict; } finally { releaseSchemaWriteLock(); } }
protected void setMaxInternal(final String max) { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); acquireSchemaWriteLock(); try { checkEmbedded(); checkForDateFormat(max); this.max = max; } finally { releaseSchemaWriteLock(); } }
protected void setNameInternal(final String name) { getDatabase().checkSecurity(ORule.ResourceGeneric.SCHEMA, ORole.PERMISSION_UPDATE); String oldName = this.globalRef.getName(); acquireSchemaWriteLock(); try { checkEmbedded(); owner.renameProperty(oldName, name); this.globalRef = owner.owner.findOrCreateGlobalProperty(name, this.globalRef.getType()); } finally { releaseSchemaWriteLock(); } owner.firePropertyNameMigration(getDatabase(), oldName, name, this.globalRef.getType()); }