|
|
@@ -18,19 +18,20 @@ class Core_AclBase {
|
|
|
public $_db = 0; // database id zasobu
|
|
|
public $_rootTableName = null;
|
|
|
|
|
|
- public function getNamespace() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getSourceName() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getName() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getRootTableName() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getXsdFieldType($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
+ public function getNamespace() { throw new HttpException("Acl::getNamespace() Not implemented", 501); }
|
|
|
+ public function getSourceName() { throw new HttpException("Acl::getSourceName() Not implemented", 501); }
|
|
|
+ public function getName() { throw new HttpException("Acl::getName() Not implemented", 501); }
|
|
|
+ public function getRootTableName() { throw new HttpException("Acl::getRootTableName() Not implemented", 501); }
|
|
|
+ public function getXsdTypes() { throw new HttpException("Acl::getXsdTypes() Not implemented", 501); } // @returns [ fieldName => xsdType, ... ]
|
|
|
+ public function getXsdFieldType($fieldName) { throw new HttpException("Acl::getXsdFieldType() Not implemented", 501); }
|
|
|
public function hasSimpleSchema() { return false; }
|
|
|
- public function getSimpleSchema() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
+ public function getSimpleSchema() { throw new HttpException("Acl::getSimpleSchema() Not implemented", 501); }
|
|
|
// TODO: get more xsd restrictions like minOccurs, maxOccurs, nillable and restrictions
|
|
|
|
|
|
public function getID() { return $this->_zasobID; }
|
|
|
public function getDatabaseID() { return $this->_db; }
|
|
|
- public function init($force = false) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isInitialized() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
+ public function init($force = false) { throw new HttpException("Acl::init() Not implemented", 501); }
|
|
|
+ public function isInitialized() { throw new HttpException("Acl::isInitialized() Not implemented", 501); }
|
|
|
public function hasField($fieldName) {// TODO: fix use Core_AclFields or ACL::getObjectFields($namespace) - use cache - one place to store structure
|
|
|
foreach ($this->getFields() as $field) {
|
|
|
if ($fieldName === $field['name']) return true;
|
|
|
@@ -47,7 +48,7 @@ class Core_AclBase {
|
|
|
$field['label'] = $label;
|
|
|
$this->_fields[$fieldID] = $field;
|
|
|
*/
|
|
|
- throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501);
|
|
|
+ throw new HttpException("Acl::getFields() Not implemented", 501);
|
|
|
}
|
|
|
public function getFieldLabel($fieldName) {
|
|
|
// DBG::log($this->getFields(), 'array', "DBG getFieldLabel({$fieldName})");
|
|
|
@@ -76,35 +77,35 @@ class Core_AclBase {
|
|
|
}
|
|
|
return $fieldName;
|
|
|
}
|
|
|
- public function getFieldListByIdZasob() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
- public function getLocalFieldList() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
- public function getRealFieldListByIdZasob() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
- public function getVirtualFieldListByIdZasob() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
+ public function getFieldListByIdZasob() { throw new HttpException("Acl::getFieldListByIdZasob() Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
+ public function getLocalFieldList() { throw new HttpException("Acl::getLocalFieldList() Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
+ public function getRealFieldListByIdZasob() { throw new HttpException("Acl::getRealFieldListByIdZasob() Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
+ public function getVirtualFieldListByIdZasob() { throw new HttpException("Acl::getVirtualFieldListByIdZasob() Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
// TODO: public function getFieldList(); // @retuns array of field names
|
|
|
|
|
|
public function isIntegerField($fieldName) { return ('xsd:integer' == $this->getXsdFieldType($fieldName)); }
|
|
|
- public function isDecimalField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isGeomField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isDateField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isDateTimeField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isTimeField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isStringField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isTextField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isBinaryField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function isEnumerationField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getEnumerations($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getFieldType($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
-
|
|
|
- public function getFieldIdByName($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: legacy
|
|
|
- public function isAllowed($idZasob, $taskPerm, $record = null) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: legacy
|
|
|
- public function hasFieldPerm($idZasob, $taskPerm) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: legacy
|
|
|
+ public function isDecimalField($fieldName) { throw new HttpException("Acl::isDecimalField() Not implemented", 501); }
|
|
|
+ public function isGeomField($fieldName) { throw new HttpException("Acl::isGeomField() Not implemented", 501); }
|
|
|
+ public function isDateField($fieldName) { throw new HttpException("Acl::isDateField() Not implemented", 501); }
|
|
|
+ public function isDateTimeField($fieldName) { throw new HttpException("Acl::isDateTimeField() Not implemented", 501); }
|
|
|
+ public function isTimeField($fieldName) { throw new HttpException("Acl::isTimeField() Not implemented", 501); }
|
|
|
+ public function isStringField($fieldName) { throw new HttpException("Acl::isStringField() Not implemented", 501); }
|
|
|
+ public function isTextField($fieldName) { throw new HttpException("Acl::isTextField() Not implemented", 501); }
|
|
|
+ public function isBinaryField($fieldName) { throw new HttpException("Acl::isBinaryField() Not implemented", 501); }
|
|
|
+ public function isEnumerationField($fieldName) { throw new HttpException("Acl::isEnumerationField() Not implemented", 501); }
|
|
|
+ public function getEnumerations($fieldName) { throw new HttpException("Acl::getEnumerations() Not implemented", 501); }
|
|
|
+ public function getFieldType($fieldName) { throw new HttpException("Acl::getFieldType() Not implemented", 501); }
|
|
|
+
|
|
|
+ public function getFieldIdByName($fieldName) { throw new HttpException("Acl::getFieldIdByName() Not implemented", 501); }// TODO: legacy
|
|
|
+ public function isAllowed($idZasob, $taskPerm, $record = null) { throw new HttpException("Acl::isAllowed() Not implemented", 501); }// TODO: legacy
|
|
|
+ public function hasFieldPerm($idZasob, $taskPerm) { throw new HttpException("Acl::hasFieldPerm() Not implemented", 501); }// TODO: legacy
|
|
|
|
|
|
// TODO: replace isAllowed, hasFieldPerm, getFieldIdByName
|
|
|
- public function canCreateField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function canReadField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function canReadObjectField($fieldName, $record) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function canWriteField($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function canWriteObjectField($fieldName, $record) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
+ public function canCreateField($fieldName) { throw new HttpException("Acl::canCreateField() Not implemented", 501); }
|
|
|
+ public function canReadField($fieldName) { throw new HttpException("Acl::canReadField() Not implemented", 501); }
|
|
|
+ public function canReadObjectField($fieldName, $record) { throw new HttpException("Acl::canReadObjectField() Not implemented", 501); }
|
|
|
+ public function canWriteField($fieldName) { throw new HttpException("Acl::canWriteField() Not implemented", 501); }
|
|
|
+ public function canWriteObjectField($fieldName, $record) { throw new HttpException("Acl::canWriteObjectField() Not implemented", 501); }
|
|
|
public function canWriteRecord($record) {// TODO: AclHelper?
|
|
|
$record = (array)$record;
|
|
|
$dbgArr = array();
|
|
|
@@ -216,9 +217,9 @@ class Core_AclBase {
|
|
|
Lib::loadClass('AclQueryFeatures');
|
|
|
return new AclQueryFeatures($this, $params, $legacyMode = true);
|
|
|
}
|
|
|
- public function getItems($params = array()) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: use ParseOgcQuery
|
|
|
- public function getTotal($params = array()) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: use ParseOgcQuery
|
|
|
- public function getItem($primaryKey, $params = []) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
+ public function getItems($params = array()) { throw new HttpException("Acl::getItems() Not implemented", 501); }// TODO: use ParseOgcQuery
|
|
|
+ public function getTotal($params = array()) { throw new HttpException("Acl::getTotal() Not implemented", 501); }// TODO: use ParseOgcQuery
|
|
|
+ public function getItem($primaryKey, $params = []) { throw new HttpException("Acl::getItem() Not implemented", 501); }
|
|
|
|
|
|
public function itemsFetchRefs(&$items) {
|
|
|
$DBG = V::get('DBG_DS', 0, $_GET, 'int');
|
|
|
@@ -255,11 +256,11 @@ class Core_AclBase {
|
|
|
return $items;
|
|
|
}
|
|
|
|
|
|
- public function addItem($todoItem) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function updateItem($itemPatch) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getGeomFieldType($fieldName) { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getPrimaryKeyField() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
- public function getAttributesFromZasoby() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }
|
|
|
+ public function addItem($todoItem) { throw new HttpException("Acl::addItem() Not implemented", 501); }
|
|
|
+ public function updateItem($itemPatch) { throw new HttpException("Acl::updateItem() Not implemented", 501); }
|
|
|
+ public function getGeomFieldType($fieldName) { throw new HttpException("Acl::getGeomFieldType() Not implemented", 501); }
|
|
|
+ public function getPrimaryKeyField() { throw new HttpException("Acl::getPrimaryKeyField() Not implemented", 501); }
|
|
|
+ public function getAttributesFromZasoby() { throw new HttpException("Acl::getAttributesFromZasoby() Not implemented", 501); }
|
|
|
|
|
|
public function validateDeleteXml($action) {// @returns action tags, throws Exceptions
|
|
|
$DBG = V::get('DBG_XML', 0, $_GET, 'int');
|