ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
ilObjectDAV ($refId, $obj=null) | |
Constructor. | |
getRefId () | |
Returns the ref id of this object. | |
getObjectId () | |
Returns the object id of this object. | |
getNodeId () | |
Returns the node id of this object. | |
initFromNull () | |
Initializes the object after it has been converted from NULL. | |
read () | |
Reads the object data. | |
write () | |
Writes the object data. | |
getResourceName () | |
Returns the resource name of this object. | |
setResourceName ($name) | |
Sets the resource name of this object. | |
getDisplayName () | |
Returns the display name of this object. | |
getCreationTimestamp () | |
Returns the creation date of this object as a Unix timestamp. | |
getModificationTimestamp () | |
Returns the modification date of this object as a Unix timestamp. | |
getResourceType () | |
Returns the DAV resource type of this object. | |
isCollection () | |
Returns true if this object is a DAV collection. | |
isFile () | |
Returns true if this object is a DAV file. | |
isNullResource () | |
Returns true if this is a null resource. | |
getContentType () | |
Returns the mime type of the content of this object. | |
setContentType ($type) | |
Sets the mime type of the content of this object. | |
setContentLength ($length) | |
Sets the length (number of bytes) of the content of this object. | |
getContentLength () | |
Returns the number of bytes of the content. | |
getContentStream () | |
Returns the content of the object as a stream. | |
getContentOutputStream () | |
Returns an output stream to the content. | |
getContentOutputStreamLength () | |
Returns the length of the content output stream. | |
getContentData () | |
Returns the content of the object as a byte array. | |
isOnline () | |
Returns true if the object is online. | |
isPermitted ($operations, $type= '') | |
Returns whether a specific operation is permitted for the current user. | |
getILIASType () | |
Returns the ilias type of the current object. | |
getILIASCollectionType () | |
Returns the ilias type for collections that can be created as children of this object. | |
getILIASFileType () | |
Returns the ilias type for files that can be created as children of this object. | |
createNewVersion () | |
Creates a new version of the object. | |
createCollection ($name) | |
Creates a dav collection as a child of this object. | |
createFile ($name) | |
Creates a dav file as a child of this object. | |
createFileFromNull ($name, &$nullDAV) | |
Creates a dav file as a child of this object. | |
createNull ($name) | |
Creates a dav null object as a child of this object. | |
remove ($objDAV) | |
Removes the specified child from this object. | |
addCopy (&$objDAV, $newName=null) | |
Adds a copy of the specified object as a child to this object. | |
cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null) | |
Recursively clones all nodes of the RBAC tree. | |
addMove (&$objDAV, $newName=null) | |
Adds (moves) the specified object as a child to this object. | |
removeDeletedNodes ($a_node_id, $a_checked, $a_delete_objects=true) | |
remove already deleted objects within the objects in trash recursive function | |
children () | |
Returns the children of this object. | |
childrenWithPermission ($operations, $type='') | |
Returns the children of this object with the specified permissions. | |
createObject ($refId, $type) | |
Static factory method to create a DAV object for a given refId and type. | |
writelog ($message) | |
Writes a message to the logfile.,. | |
__toString () | |
This method is needed, because the object class in PHP 5.2 does not have a default implementation of this method anymore. |
Data Fields | |
$refId | |
Refid to the object. | |
$obj | |
Application layer object. | |
$isDebug = false | |
The ObjectDAV prints lots of log messages to the ilias log, if this variable is set to true. |
Definition at line 36 of file class.ilObjectDAV.php.
ilObjectDAV::__toString | ( | ) |
This method is needed, because the object class in PHP 5.2 does not have a default implementation of this method anymore.
Definition at line 868 of file class.ilObjectDAV.php.
References getObjectId().
ilObjectDAV::addCopy | ( | & | $objDAV, |
$newName = null |
|||
) |
Adds a copy of the specified object as a child to this object.
ilObjectDAV | the object to be copied. |
string | the new name of the copy (optional). |
Definition at line 520 of file class.ilObjectDAV.php.
References cloneNodes(), createObject(), getRefId(), and writelog().
ilObjectDAV::addMove | ( | & | $objDAV, |
$newName = null |
|||
) |
Adds (moves) the specified object as a child to this object.
The object is removed from its former parent.
ilObjectDAV | the object to be moved. |
string | the new name (optional). |
Definition at line 595 of file class.ilObjectDAV.php.
References $log, getRefId(), and writelog().
ilObjectDAV::children | ( | ) |
Returns the children of this object.
Reimplemented in ilObjMountPointDAV.
Definition at line 733 of file class.ilObjectDAV.php.
References createObject(), and getRefId().
Referenced by childrenWithPermission().
ilObjectDAV::childrenWithPermission | ( | $operations, | |
$type = '' |
|||
) |
Returns the children of this object with the specified permissions.
string | one or more operations, separated by commas (i.e.: visible,read,join) |
string | the ILIAS type definition abbreviation (i.e.: frm,grp,crs) (only needed for 'create' operation'. |
Definition at line 768 of file class.ilObjectDAV.php.
References children().
ilObjectDAV::cloneNodes | ( | $srcRef, | |
$dstRef, | |||
& | $mapping, | ||
$newName = null |
|||
) |
Recursively clones all nodes of the RBAC tree.
private
integer | ref_id of source object |
integer | ref_id of destination object |
array | mapping new_ref_id => old_ref_id |
string | the new name of the copy (optional). |
Definition at line 541 of file class.ilObjectDAV.php.
References createObject(), and writelog().
Referenced by addCopy().
ilObjectDAV::createCollection | ( | $name | ) |
Creates a dav collection as a child of this object.
string | the name of the collection. |
Reimplemented in ilObjCategoryDAV.
Definition at line 395 of file class.ilObjectDAV.php.
References getILIASCollectionType(), and getRefId().
ilObjectDAV::createFile | ( | $name | ) |
Creates a dav file as a child of this object.
string | the name of the file. |
Definition at line 419 of file class.ilObjectDAV.php.
References getILIASFileType(), ilMimeTypeUtil\getMimeType(), and getRefId().
ilObjectDAV::createFileFromNull | ( | $name, | |
& | $nullDAV | ||
) |
Creates a dav file as a child of this object.
string | the name of the file. |
Definition at line 455 of file class.ilObjectDAV.php.
References getILIASFileType(), and getRefId().
ilObjectDAV::createNewVersion | ( | ) |
Creates a new version of the object.
Only objects which support versioning need to implement this method.
Reimplemented in ilObjFileDAV.
Definition at line 385 of file class.ilObjectDAV.php.
ilObjectDAV::createNull | ( | $name | ) |
Creates a dav null object as a child of this object.
null objects are used for locking names.
string | the name of the null object. |
Definition at line 472 of file class.ilObjectDAV.php.
References getRefId().
ilObjectDAV::createObject | ( | $refId, | |
$type | |||
) |
Static factory method to create a DAV object for a given refId and type.
int | refID. |
String | type The ILIAS object type. |
Definition at line 793 of file class.ilObjectDAV.php.
References $refId.
Referenced by addCopy(), ilObjMountPointDAV\children(), children(), cloneNodes(), ilObjNullDAV\convertToILIASType(), ilDAVServer\getObject(), and ilDAVServer\toObjectPath().
ilObjectDAV::getContentData | ( | ) |
Returns the content of the object as a byte array.
Reimplemented in ilObjFileDAV.
Definition at line 289 of file class.ilObjectDAV.php.
ilObjectDAV::getContentLength | ( | ) |
Returns the number of bytes of the content.
Reimplemented in ilObjMountPointDAV, ilObjFileDAV, ilObjRootDAV, ilObjCategoryDAV, ilObjCourseDAV, ilObjFolderDAV, and ilObjGroupDAV.
Definition at line 251 of file class.ilObjectDAV.php.
ilObjectDAV::getContentOutputStream | ( | ) |
Returns an output stream to the content.
Reimplemented in ilObjFileDAV.
Definition at line 267 of file class.ilObjectDAV.php.
ilObjectDAV::getContentOutputStreamLength | ( | ) |
Returns the length of the content output stream.
This method is used by the ilDAVServer, if a PUT operation has been performed for which the client did not specify the content length.
Integer. |
Reimplemented in ilObjFileDAV.
Definition at line 280 of file class.ilObjectDAV.php.
ilObjectDAV::getContentStream | ( | ) |
Returns the content of the object as a stream.
Reimplemented in ilObjFileDAV.
Definition at line 259 of file class.ilObjectDAV.php.
ilObjectDAV::getContentType | ( | ) |
Returns the mime type of the content of this object.
Reimplemented in ilObjMountPointDAV, ilObjNullDAV, ilObjRootDAV, ilObjFileDAV, ilObjCategoryDAV, ilObjCourseDAV, ilObjFolderDAV, and ilObjGroupDAV.
Definition at line 227 of file class.ilObjectDAV.php.
ilObjectDAV::getCreationTimestamp | ( | ) |
Returns the creation date of this object as a Unix timestamp.
Precondition: Object must have been read.
Reimplemented in ilObjMountPointDAV, and ilObjRootDAV.
Definition at line 171 of file class.ilObjectDAV.php.
ilObjectDAV::getDisplayName | ( | ) |
Returns the display name of this object.
Precondition: Object must have been read.
Reimplemented in ilObjMountPointDAV, and ilObjRootDAV.
Definition at line 161 of file class.ilObjectDAV.php.
ilObjectDAV::getILIASCollectionType | ( | ) |
Returns the ilias type for collections that can be created as children of this object.
Reimplemented in ilObjRootDAV, and ilObjCategoryDAV.
Definition at line 369 of file class.ilObjectDAV.php.
Referenced by createCollection().
ilObjectDAV::getILIASFileType | ( | ) |
Returns the ilias type for files that can be created as children of this object.
Definition at line 376 of file class.ilObjectDAV.php.
Referenced by createFile(), and createFileFromNull().
ilObjectDAV::getILIASType | ( | ) |
Returns the ilias type of the current object.
Definition at line 357 of file class.ilObjectDAV.php.
References $GLOBALS.
ilObjectDAV::getModificationTimestamp | ( | ) |
Returns the modification date of this object as a Unix timestamp.
Precondition: Object must have been read.
Reimplemented in ilObjMountPointDAV, and ilObjRootDAV.
Definition at line 181 of file class.ilObjectDAV.php.
ilObjectDAV::getNodeId | ( | ) |
Returns the node id of this object.
This only used by objects that are represented as a single object in RBAC, but as multiple objects in WebDAV.
Definition at line 93 of file class.ilObjectDAV.php.
ilObjectDAV::getObjectId | ( | ) |
Returns the object id of this object.
Reimplemented in ilObjMountPointDAV, and ilObjRootDAV.
Definition at line 82 of file class.ilObjectDAV.php.
Referenced by __toString().
ilObjectDAV::getRefId | ( | ) |
Returns the ref id of this object.
Definition at line 74 of file class.ilObjectDAV.php.
References $refId.
Referenced by addCopy(), addMove(), children(), ilObjNullDAV\convertToILIASType(), ilObjCategoryDAV\createCollection(), createCollection(), createFile(), createFileFromNull(), createNull(), ilObjFileDAV\initFromNull(), initFromNull(), isPermitted(), ilObjGroupDAV\read(), ilObjCourseDAV\read(), read(), ilObjNullDAV\read(), ilObjRootDAV\read(), and ilObjFileDAV\read().
ilObjectDAV::getResourceName | ( | ) |
Returns the resource name of this object.
Precondition: Object must have been read.
Reimplemented in ilObjMountPointDAV, and ilObjRootDAV.
Definition at line 142 of file class.ilObjectDAV.php.
Referenced by ilObjFileDAV\initFromNull().
ilObjectDAV::getResourceType | ( | ) |
Returns the DAV resource type of this object.
Reimplemented in ilObjMountPointDAV, ilObjNullDAV, ilObjRootDAV, ilObjFileDAV, ilObjCategoryDAV, ilObjCourseDAV, ilObjFolderDAV, and ilObjGroupDAV.
Definition at line 191 of file class.ilObjectDAV.php.
Referenced by isCollection(), isFile(), and isNullResource().
ilObjectDAV::ilObjectDAV | ( | $refId, | |
$obj = null |
|||
) |
Constructor.
int | A refId to the object. |
Definition at line 59 of file class.ilObjectDAV.php.
References $obj, $refId, and writelog().
Referenced by ilObjCategoryDAV\ilObjCategoryDAV(), ilObjCourseDAV\ilObjCourseDAV(), ilObjFileDAV\ilObjFileDAV(), ilObjFolderDAV\ilObjFolderDAV(), ilObjGroupDAV\ilObjGroupDAV(), ilObjMountPointDAV\ilObjMountPointDAV(), ilObjNullDAV\ilObjNullDAV(), and ilObjRootDAV\ilObjRootDAV().
ilObjectDAV::initFromNull | ( | ) |
Initializes the object after it has been converted from NULL.
We create all the additonal object data that is needed, to make the object work.
Reimplemented in ilObjFileDAV.
Definition at line 104 of file class.ilObjectDAV.php.
References getRefId().
ilObjectDAV::isCollection | ( | ) |
Returns true if this object is a DAV collection.
Definition at line 201 of file class.ilObjectDAV.php.
References getResourceType().
ilObjectDAV::isFile | ( | ) |
Returns true if this object is a DAV file.
Definition at line 210 of file class.ilObjectDAV.php.
References getResourceType().
ilObjectDAV::isNullResource | ( | ) |
Returns true if this is a null resource.
Null objects are used for locking names.
Definition at line 218 of file class.ilObjectDAV.php.
References getResourceType().
ilObjectDAV::isOnline | ( | ) |
Returns true if the object is online.
Reimplemented in ilObjCourseDAV.
Definition at line 297 of file class.ilObjectDAV.php.
Referenced by isPermitted().
ilObjectDAV::isPermitted | ( | $operations, | |
$type = '' |
|||
) |
Returns whether a specific operation is permitted for the current user.
This method takes all conditions into account that are required to perform the specified action on behalf of the current user.
string | one or more operations, separated by commas (i.e.: visible,read,join) |
string | the ILIAS type definition abbreviation (i.e.: frm,grp,crs) (only needed for 'create' operation'. |
Reimplemented in ilObjMountPointDAV.
Definition at line 312 of file class.ilObjectDAV.php.
References $_GET, $GLOBALS, getRefId(), and isOnline().
ilObjectDAV::read | ( | ) |
Reads the object data.
Reimplemented in ilObjFileDAV, ilObjRootDAV, ilObjNullDAV, ilObjCourseDAV, ilObjGroupDAV, and ilObjMountPointDAV.
Definition at line 116 of file class.ilObjectDAV.php.
References getRefId().
ilObjectDAV::remove | ( | $objDAV | ) |
Removes the specified child from this object.
ilObjectDAV | the child to be removed. |
Definition at line 499 of file class.ilObjectDAV.php.
References ilUtil\removeItemFromDesktops().
ilObjectDAV::removeDeletedNodes | ( | $a_node_id, | |
$a_checked, | |||
$a_delete_objects = true |
|||
) |
remove already deleted objects within the objects in trash recursive function
public
integer | ref_id of source object |
boolean |
Definition at line 678 of file class.ilObjectDAV.php.
References $log, $query, $res, and $row.
ilObjectDAV::setContentLength | ( | $length | ) |
Sets the length (number of bytes) of the content of this object.
Integer. |
Reimplemented in ilObjFileDAV.
Definition at line 243 of file class.ilObjectDAV.php.
ilObjectDAV::setContentType | ( | $type | ) |
Sets the mime type of the content of this object.
String. |
Reimplemented in ilObjFileDAV.
Definition at line 235 of file class.ilObjectDAV.php.
ilObjectDAV::setResourceName | ( | $name | ) |
Sets the resource name of this object.
Precondition: Object must have been read. String.
Definition at line 151 of file class.ilObjectDAV.php.
References writelog().
ilObjectDAV::write | ( | ) |
Writes the object data.
Reimplemented in ilObjFileDAV, ilObjCategoryDAV, and ilObjMountPointDAV.
Definition at line 130 of file class.ilObjectDAV.php.
References writelog().
Referenced by ilObjNullDAV\convertToILIASType().
ilObjectDAV::writelog | ( | $message | ) |
Writes a message to the logfile.,.
message | String. |
Definition at line 845 of file class.ilObjectDAV.php.
References $log.
Referenced by addCopy(), addMove(), cloneNodes(), ilObjNullDAV\convertToILIASType(), ilObjectDAV(), setResourceName(), and write().
ilObjectDAV::$isDebug = false |
The ObjectDAV prints lots of log messages to the ilias log, if this variable is set to true.
Definition at line 52 of file class.ilObjectDAV.php.
ilObjectDAV::$obj |
Application layer object.
Definition at line 46 of file class.ilObjectDAV.php.
Referenced by ilObjectDAV(), ilObjFileDAV\ilObjFileDAV(), and ilObjNullDAV\ilObjNullDAV().
ilObjectDAV::$refId |
Refid to the object.
Definition at line 41 of file class.ilObjectDAV.php.
Referenced by ilObjNullDAV\convertToILIASType(), createObject(), getRefId(), and ilObjectDAV().