ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSDataMappingSetting Class Reference
+ Collaboration diagram for ilECSDataMappingSetting:

Public Member Functions

 __construct ($a_server_id=0, $mapping_type=0, $ecs_field= '')
 constructor public
 setServerId ($a_server_id)
 set server id
 getServerId ()
 Get server id.
 setECSField ($ecs_field)
 getECSField ()
 Get ecs field.
 setMappingType ($mapping_type)
 Set mapping type.
 getMappingType ()
 Get mapping type.
 getAdvMDId ()
 setAdvMDId ($a_id)
 save ()
 Save mappings.

Static Public Member Functions

static deleteByServerId ($a_server_id)

Data Fields

const MAPPING_EXPORT = 1
const MAPPING_IMPORT_CRS = 2
const MAPPING_IMPORT_RCRS = 3

Protected Member Functions

 update ()
 Update setting ilDB $ilDB.
 create ()

Private Member Functions

 read ()
 Read settings.

Private Attributes

 $server_id = 0
 $mapping_type = 0
 $ecs_field = 0
 $advmd_id = 0

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 32 of file class.ilECSDataMappingSetting.php.

Constructor & Destructor Documentation

ilECSDataMappingSetting::__construct (   $a_server_id = 0,
  $mapping_type = 0,
  $ecs_field = '' 
)

constructor public

Definition at line 50 of file class.ilECSDataMappingSetting.php.

References $ecs_field, $mapping_type, setECSField(), setMappingType(), and setServerId().

{
$this->setServerId($a_server_id);
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSDataMappingSetting::create ( )
protected

Definition at line 163 of file class.ilECSDataMappingSetting.php.

References $query, $res, getAdvMDId(), getECSField(), getMappingType(), and getServerId().

Referenced by save().

{
global $ilDB;
$query = 'INSERT INTO ecs_data_mapping (sid,mapping_type,ecs_field,advmd_id) '.
'VALUES('.
$ilDB->quote($this->getServerId(), 'integer') . ', ' .
$ilDB->quote($this->getMappingType(),'integer').', '.
$ilDB->quote($this->getECSField(),'text').', '.
$ilDB->quote($this->getAdvMDId(),'integer').' ) ';
$res = $ilDB->manipulate($query);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilECSDataMappingSetting::deleteByServerId (   $a_server_id)
static

Definition at line 202 of file class.ilECSDataMappingSetting.php.

References $query.

Referenced by ilECSSetting\delete().

{
global $ilDB;
$query = 'DELETE FROM ecs_data_mapping'.
' WHERE sid = '.$ilDB->quote($a_server_id,'integer');
$ilDB->manipulate($query);
return true;
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::getAdvMDId ( )
Returns
int

Definition at line 113 of file class.ilECSDataMappingSetting.php.

References $advmd_id.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::getECSField ( )

Get ecs field.

Definition at line 86 of file class.ilECSDataMappingSetting.php.

References $ecs_field.

Referenced by create(), read(), save(), and update().

{
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::getMappingType ( )

Get mapping type.

Definition at line 103 of file class.ilECSDataMappingSetting.php.

References $mapping_type.

Referenced by create(), read(), save(), and update().

{
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::getServerId ( )

Get server id.

Definition at line 69 of file class.ilECSDataMappingSetting.php.

References $server_id.

Referenced by create(), read(), save(), and update().

{
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::read ( )
private

Read settings.

private

Definition at line 184 of file class.ilECSDataMappingSetting.php.

References $query, $res, $row, DB_FETCHMODE_OBJECT, getECSField(), getMappingType(), getServerId(), and setAdvMDId().

{
global $ilDB;
if($this->getServerId() and $this->getMappingType() and $this->getECSField())
{
$query = 'SELECT * FROM ecs_data_mapping '.
'WHERE sid = '.$ilDB->quote($this->getServerId(),'integer').' '.
'AND mapping_type = '.$ilDB->quote($this->getMappingType(),'integer').' '.
'AND ecs_field = '.$ilDB->quote($this->getECSField(),'text');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setAdvMDId($row->advmd_id);
}
}
}

+ Here is the call graph for this function:

ilECSDataMappingSetting::save ( )

Save mappings.

public

Definition at line 128 of file class.ilECSDataMappingSetting.php.

References $query, $res, create(), getECSField(), getMappingType(), getServerId(), and update().

{
global $ilDB;
$query = 'SELECT * FROM ecs_data_mapping '.
'WHERE sid = '.$ilDB->quote($this->getServerId(),'integer').' '.
'AND mapping_type = '.$ilDB->quote($this->getMappingType(),'integer').' '.
'AND ecs_field = '.$ilDB->quote($this->getECSField(),'text');
$res = $ilDB->query($query);
if($res->numRows())
{
$this->update();
}
else
{
$this->create();
}
}

+ Here is the call graph for this function:

ilECSDataMappingSetting::setAdvMDId (   $a_id)

Definition at line 118 of file class.ilECSDataMappingSetting.php.

Referenced by read().

{
$this->advmd_id = $a_id;
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::setECSField (   $ecs_field)
Parameters
string$ecs_field

Definition at line 78 of file class.ilECSDataMappingSetting.php.

References $ecs_field.

Referenced by __construct().

{
$this->ecs_field = $ecs_field;
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::setMappingType (   $mapping_type)

Set mapping type.

Parameters
int$mapping_type

Definition at line 95 of file class.ilECSDataMappingSetting.php.

References $mapping_type.

Referenced by __construct().

{
$this->mapping_type = $mapping_type;
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::setServerId (   $a_server_id)

set server id

Parameters
int$a_server_id

Definition at line 61 of file class.ilECSDataMappingSetting.php.

Referenced by __construct().

{
$this->server_id = $a_server_id;
}

+ Here is the caller graph for this function:

ilECSDataMappingSetting::update ( )
protected

Update setting ilDB $ilDB.

Definition at line 151 of file class.ilECSDataMappingSetting.php.

References $query, getAdvMDId(), getECSField(), getMappingType(), and getServerId().

Referenced by save().

{
global $ilDB;
$query = 'UPDATE ecs_data_mapping '.
'SET advmd_id = '.$ilDB->db->quote($this->getAdvMDId(),'integer').' '.
'WHERE sid = '.$ilDB->quote($this->getServerId(),'integer').' '.
'AND mapping_type = '.$ilDB->quote($this->getMappingType(),'integer').' '.
'AND ecs_field = '.$ilDB->quote($this->getECSField(),'text');
$ilDB->manipulate($query);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilECSDataMappingSetting::$advmd_id = 0
private

Definition at line 42 of file class.ilECSDataMappingSetting.php.

Referenced by getAdvMDId().

ilECSDataMappingSetting::$ecs_field = 0
private

Definition at line 41 of file class.ilECSDataMappingSetting.php.

Referenced by __construct(), getECSField(), and setECSField().

ilECSDataMappingSetting::$mapping_type = 0
private

Definition at line 40 of file class.ilECSDataMappingSetting.php.

Referenced by __construct(), getMappingType(), and setMappingType().

ilECSDataMappingSetting::$server_id = 0
private

Definition at line 39 of file class.ilECSDataMappingSetting.php.

Referenced by getServerId().

const ilECSDataMappingSetting::MAPPING_EXPORT = 1
const ilECSDataMappingSetting::MAPPING_IMPORT_CRS = 2

Definition at line 36 of file class.ilECSDataMappingSetting.php.

Referenced by ilECSSettingsGUI\initMappingsForm().


The documentation for this class was generated from the following file: