3
* Copyright (c) 2008 Zivios, LLC.
5
* This file is part of Zivios.
7
* Zivios is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
12
* Zivios is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with Zivios. If not, see <http://www.gnu.org/licenses/>.
20
* @package mod_openafs
21
* @copyright Copyright (c) 2008 Zivios, LLC. (http://www.zivios.org)
22
* @license http://www.zivios.org/legal/license
23
* @version $Id: EMSAfsVolume.php 919 2008-08-25 11:45:23Z fkhan $
24
* @lastchangeddate $LastChangedDate: 2008-08-25 17:45:23 +0600 (Mon, 25 Aug 2008) $
27
class EMSAfsVolume extends EMSSecurityObject
29
public function __construct(Ecl_LdapObject $lobj)
31
parent::__construct($lobj);
34
* Volume Parameters for an AFS Volume
35
* Note: validators are added for any parameters where user
36
* intervention comes in or we feel is required.
38
$this->addParameter('cn','Volume ID',1);
39
$this->addParameter('emsafsvolid','Volume ID', 1);
41
$param = $this->addParameter('emsafsvolname','Volume Name', 1);
43
* Need to confirm the max possible length of a volume name from
46
$param->addValidator(new Zend_Validate_StringLength(1,32),
47
Ecl_Validate::errorCode2Array('stringlength',$param->dispname));
49
$this->addParameter('emsafsvollocation','Volume Location', 1);
50
$this->addParameter('emsafsvolpartition','Volume Partition', 1);
51
$this->addParameter('emsafsvolstatus','Volume Status', 1);
52
$this->addParameter('emsafsvolbackupid','Backup Volume ID', 1);
53
$this->addParameter('emsafsvolparentid','Parent Volume ID', 1);
54
$this->addParameter('emsafsvolcloneid','Clone Volume ID', 1);
55
$this->addParameter('emsafsvolinuse','Volume in Use', 1);
56
$this->addParameter('emsafsvolneedssalvage','Volume Needs Salvage', 1);
57
$this->addParameter('emsafsvoldestroyme','Volume Destroy', 1);
58
$this->addParameter('emsafsvoltype','Volume Type', 1);
59
$this->addParameter('emsafsvolcreationdate','Volume Creation Date', 1);
60
$this->addParameter('emsafsvolaccessdate','Volume Access Date', 1);
61
$this->addParameter('emsafsvolcopydate','Volume Copy Date', 1);
62
$this->addParameter('emsafsvolbackupdate','Volume Backup Date', 1);
63
$this->addParameter('emsafsvolupdatedate','Volume Update Date', 1);
64
$this->addParameter('emsafsvoldiskused','Volume Disk Used', 1);
67
* Validator added for max afs volume quota.
69
$param = $this->addParameter('emsafsvolmaxquota','Volume Max Quota', 1);
70
$param->addValidator(new Zend_Validate_Digits(),
71
Ecl_Validate::errorCode2Array('digits',$param->dispname));
73
$this->addParameter('emsafsvolmountpoint','Volume Mount Point', 1);
74
$this->addParameter('emsafsvolfilecount','Volume File Count', 1);
75
$this->addParameter('emsafsvoldayuse','Volume Day Use', 1);
76
$this->addParameter('emsafsvolweekuse','Volume Week Use', 1);
77
$this->addParameter('emsafsvolflags','Volume Flags', 1);
78
$this->addParameter('emstype','EMS Object Type', 1);
82
public function add(EMSObject $parent,Ecl_Transaction_Handler $handler=null)
84
if ($handler == null) {
85
$handler = $this->getTransaction();
87
if (get_class($this) == 'EMSAfsVolume') {
89
$this->addParameter('o','Volume Entry',1);
90
$this->setProperty('o', $this->getProperty('cn'));
92
$this->addObjectClass('emsafsvolume');
93
$this->addObjectClass('organization');
94
$this->addObjectClass('emsIgnore');
96
return parent::add($parent,$handler);