19 require_once(BASE.
"wcmf/lib/model/class.Node.php");
20 require_once(BASE.
"wcmf/lib/persistence/class.PersistenceFacade.php");
21 require_once(BASE.
"wcmf/lib/model/class.NodeIterator.php");
22 require_once(BASE.
"wcmf/lib/visitor/class.CommitVisitor.php");
39 function User($oid=null, $type=
'User')
41 parent::Node($type, $oid);
55 array(
'login' => $login,
'password' => $password), null);
81 WCMFException::throwEx(
"setLogin() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
90 WCMFException::throwEx(
"getLogin() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
99 WCMFException::throwEx(
"setPassword() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
108 WCMFException::throwEx(
"getPassword() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
117 WCMFException::throwEx(
"setName() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
126 WCMFException::throwEx(
"getName() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
135 WCMFException::throwEx(
"setFirstname() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
144 WCMFException::throwEx(
"getFirstname() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
153 WCMFException::throwEx(
"setConfig() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
162 WCMFException::throwEx(
"getConfig() must be implemented by derived class: ".get_class($this), __FILE__, __LINE__);
185 $cv->startIterator($nIter);
196 if (!$this->
hasRole($rolename))
210 $cv->startIterator($nIter);
225 for ($i=0; $i<
sizeof($roles); $i++)
226 if ($roles[$i]->
getName() == $rolename)
237 if (!$this->_hasOwnRolesLoaded)
243 $isAnonymous = $rightsManager->isAnonymous();
245 $rightsManager->deactivate();
251 $rightsManager->activate();
253 $this->_hasOwnRolesLoaded =
true;
265 if (!isset($this->_cachedRoles[$rolename]))
271 $this->_cachedRoles[$rolename] = &$role;
275 return $this->_cachedRoles[$rolename];
285 $this->_cachedRoles = array();
286 $this->_hasOwnRolesLoaded =
false;
The CommitVisitor is used to commit the object's changes to the object storage. The objects must impl...
Node is the basic component for building trees (although a Node can have one than more parents)...
& getUser($login, $password)
loadChildren($type, $buildDepth=BUILDDEPTH_SINGLE, $forceUpdate=false)
User($oid=null, $type='User')
& getRoleByName($rolename)
Abstract base class for user classes that represent a system user.
addChild(&$child, $addtype=ADDCHILD_BACK)
NodeIterator is used to iterate over a tree/list build of objects using a Depth-First-Algorithm. Classes used with the NodeIterator must implement the getChildren() and getOID() methods. NodeIterator implements the 'Iterator Pattern'. The base class NodeIterator defines the interface for all specialized Iterator classes.
throwEx($message, $file='', $line='')
removeRole($rolename, $commit=false)
getChildrenEx($oid, $type, $values, $properties, $useRegExp=true)
deleteChild($childOID, $reallyDelete=false)
addRole($rolename, $commit=false)