@Override public CaoCore getCore() throws Exception { if (protectCore) throw new AccessDeniedException("core is protected",name); return shared; }
public void authorizeUpdateAttributes(DbConnection con, Table table, Object object, boolean raw, String ... attributeNames) throws AccessDeniedException { throw new AccessDeniedException(); }
public void authorizeReadAttributes(DbConnection con, DbManager dbManagerJdbc, Class<?> clazz, String registryName, String attribute) { throw new AccessDeniedException(); }
public void authorizeSaveForceAllowed(DbConnection con, Table table, Object object, boolean raw) throws AccessDeniedException { throw new AccessDeniedException(); }
@Override public CaoCore getCore() throws Exception { if (protectCore) throw new AccessDeniedException("core is protected",name); CaoCore core = driver.connect(uri, credentials); doPrepare(core); return core; }
@Override public boolean getBoolean(String name) throws MException { if (!((AuthCore)core).hasReadAccess(instance, name)) throw new AccessDeniedException(name); return instance.getBoolean(((AuthCore)core).mapReadName(instance, name)); }
@Override public Calendar getCalendar(String name) throws MException { if (!((AuthCore)core).hasReadAccess(instance, name)) throw new AccessDeniedException(); return instance.getCalendar(((AuthCore)core).mapReadName(instance, name)); }
@Override public String getExtracted(String key) { if (!((AuthCore)core).hasReadAccess(instance, key)) throw new AccessDeniedException(); return instance.getExtracted(((AuthCore)core).mapReadName(instance, key)); }
@Override protected void doUpdate(MProperties modified) { if (!isEditable()) throw new AccessDeniedException(file); File metaFile = ((FsCore)core).getMetaFileFor(file); modified.remove("id"); try { modified.save(metaFile); } catch (IOException e) { log().w(metaFile,e); } reload(); }
@Override protected void doUpdate(MProperties modified) { if (!isEditable()) throw new AccessDeniedException(file); File metaFile = ((FdbCore)core).getMetaFileFor(file); modified.remove("id"); try { modified.save(metaFile); } catch (IOException e) { log().w(metaFile,e); } reload(); Changes change = adaptTo(Changes.class); if (change != null) change.modified(); }