Copyright © Xerox Corporation, Codendi Team, 2001-2006. All Rights Reserved
3.4 Document Manager functionsThis module works with the docman plugin and will be available only if the plugin is installed. list: Display a list of items contained in a folder
--id*: the ID of the folder.
--project: UNIX name of the project you want to retrieve the packages in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.
[terzino@linux tuleap-cli]$ ./tuleap.php docman list --id=110418 --project=myproject
+---------+-----------+----------+--------------+-------------+-------------+-------------+---------+--...
| item_id | parent_id | group_id | title | create_date | update_date | delete_date | user_id | s...
+---------+-----------+----------+--------------+-------------+-------------+-------------+---------+--...
| 110493 | 110418 | 1 | testSoap | 1293189073 | 1293189073 | | 101 | 1...
| 110491 | 110418 | 1 | CLI Document | 1293188351 | 1293188351 | | 101 | 1...
+---------+-----------+----------+--------------+-------------+-------------+-------------+---------+--...
|
Example 43. list command
getRoot: Returns the document object id that is at the top of the docman given a group object
--project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.
[terzino@linux tuleap-cli]$ ./tuleap.php docman getRoot --project=myproject
+--------+
| Result |
+--------+
| 2 |
+--------+
|
Example 44. getRoot command
createEmbeddedFile: Add a document embedded file to the document manager
--parent_id*: ID of the parent the file will be created in
--project*:Name of the project the item belongs to. If you specified the name of
the working project when you logged in, this parameter is not needed.
--title*: Title of the new document
--description: Description of the new document
--status*: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"
--content*: Content of the embedded file
--perm_read*: Groups IDs that will have the permission READ separated with comma
--perm_write*: Groups IDs that will have the permission WRITE separated with comma
--perm_manage*: Groups IDs that will have the permission MANAGE separated with comma
--perm_none*: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)
--properties*: File that contains the properties to apply to the item
--obsolescence_date*: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)
--ordering: place where the new document will be hosted. Available values are "begin" and "end"
[terzino@linux tuleap-cli]$ ./tuleap.php docman createEmbeddedFile --project=myproject --parent_id=110418 --title="EmbeddedFile sample" --content="It is just a sample to describe how we add an embedde file to the docman manager"
+--------+
| Result |
+--------+
| 110499 |
+--------+
|
Example 45. createEmbeddedFile command
Big file support: CLI is able to upload files bigger than 2GB when both CLI and remote server are running on top of 64 bits machines. createFile: Add a document file to the document manager
--parent_id*: ID of the parent the file will be created in
--project*:Name of the project the item belongs to. If you specified the name of
the working project when you logged in, this parameter is not needed.
--title*: Title of the new document
--description: Description of the new document
--status*: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"
--content*: Content of the file "local file location"
--perm_read*: Groups IDs that will have the permission READ separated with comma
--perm_write*: Groups IDs that will have the permission WRITE separated with comma
--perm_manage*: Groups IDs that will have the permission MANAGE separated with comma
--perm_none*: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)
--properties*: File that contains the properties to apply to the item
--obsolescence_date*: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)
--ordering: place where the new document will be hosted. Available values are "begin" and "end"
[terzino@linux tuleap-cli]$ ./tuleap.php docman createFile --project=myproject --parent_id=110418 --title="CLi user guide" --content="cli_user_guide.pdf"
Sending file (100%)
File uploaded successfully
+--------+
| Result |
+--------+
| 110498 |
+--------+
|
Example 46. createFile command
3.4.5 createEmptyDocumentcreateEmptyDocument: Add an empty document to the document manager
--parent_id*: ID of the parent the file will be created in
--project:Name of the project the item belongs to. If you specified the name of
the working project when you logged in, this parameter is not needed.
--title*: Title of the new document
--description: Description of the new document
--status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"
--perm_read: Groups IDs that will have the permission READ separated with comma
--perm_write: Groups IDs that will have the permission WRITE separated with comma
--perm_manage: Groups IDs that will have the permission MANAGE separated with comma
--perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)
--properties: File that contains the properties to apply to the item
--obsolescence_date: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)
--ordering: place where the new document will be hosted. Available values are "begin" and "end"
[terzino@linux tuleap-cli]$ ./tuleap.php docman createEmptyDocument --project=myproject --parent_id=110418 --title="user guide help"
+--------+
| Result |
+--------+
| 110500 |
+--------+
|
Example 47. createEmptyDocument command
createLink: Add a document link to the document manager
--parent_id*: ID of the parent the file will be created in
--project*:Name of the project the item belongs to. If you specified the name of
the working project when you logged in, this parameter is not needed.
--title*: Title of the new document
--content*: Url of the link
--description: Description of the new document
--status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"
--perm_read: Groups IDs that will have the permission READ separated with comma
--perm_write: Groups IDs that will have the permission WRITE separated with comma
--perm_manage: Groups IDs that will have the permission MANAGE separated with comma
--perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)
--properties: File that contains the properties to apply to the item
--obsolescence_date: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)
--ordering: place where the new document will be hosted. Available values are "begin" and "end"
[terzino@linux tuleap-cli]$ ./tuleap.php docman createLink --project=myproject --parent_id=110418 --title="user guide link" --content="codendi.org"
+--------+
| Result |
+--------+
| 110501 |
+--------+
|
Example 48. createLink command
createWikiPage: Add a wiki document to the document manager
--parent_id*: ID of the parent the file will be created in
--title*: Title of the new document
--content*: Name of the wiki page
--project:Name of the project the item belongs to. If you specified the name of
the working project when you logged in, this parameter is not needed.
--description: Description of the new document
--status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"
--perm_read: Groups IDs that will have the permission READ separated with comma
--perm_write: Groups IDs that will have the permission WRITE separated with comma
--perm_manage: Groups IDs that will have the permission MANAGE separated with comma
--perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)
--properties: File that contains the properties to apply to the item
--obsolescence_date: Date when the document will be obsolete (yy-mm-dd|yyyy-mm-dd)
--ordering: place where the new document will be hosted. Available values are "begin" and "end"
[terzino@linux tuleap-cli]$ ./tuleap.php docman createWikiPage --project=myproject --parent_id=110418 --title="user guide wiki" --content="user_guide_wiki"
+--------+
| Result |
+--------+
| 110502 |
+--------+
|
Example 49. createWikiPage command
createFolder: Add a folder to the document manager
--parent_id*: ID of the parent the folder will be created in
--title*: Title of the new folder
--description: Description of the new folder
--ordering: place where the new folder will be hosted. Available values are "begin" and "end"
--project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.
--status: Status to apply to the item. Available status are "none", "draft", "approved", and "rejected"
--perm_read: Groups IDs that will have the permission READ separated with comma
--perm_write: Groups IDs that will have the permission WRITE separated with comma
--perm_manage: Groups IDs that will have the permission MANAGE separated with comma
--perm_none: Groups IDs that will have no permission separated with comma(ie. those groups will not inherit the permissions of the parent folder)
--properties: File that contains the properties to apply to the item
[terzino@linux tuleap-cli]$ ./tuleap.php docman createFolder --project=myproject --parent_id=110418 --title="Tech docs folder"
+--------+
| Result |
+--------+
| 110503 |
+--------+
|
Example 50. createFolder command
getFile: Get an item (File/Embedded file)
--id*: ID of the item to download
--output: Name of the file to write the file to
--remote_name: Use the name retrieved from the server instead of using --output
--version: The version number that we want to download, if not specified the current one
--project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.
[terzino@linux tuleap-cli]$ ./tuleap.php docman getFile --project=myproject --id=110493 --version_number=1 --output=document_cli.doc
File retrieved successfully.
|
Example 51. getFile command
delete: Delete an item
--id*: ID of the item to delete
--project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.
[terzino@linux tuleap-cli]$ ./tuleap.php docman delete --project=myproject --id=110502
+--------+
| Result |
+--------+
| 1 |
+--------+
|
Example 52. delete command
monitor: Monitor an item
--id*: ID of the item to monitor
--project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.
[terzino@linux tuleap-cli]$ ./tuleap.php docman monitor --project=myproject --id=110501
+--------+
| Result |
+--------+
| 1 |
+--------+
|
Example 53. monitor command
move: Move an item
--id*: ID of the item to move
--parent*: ID of the folder the item will be moved in
--project: UNIX name of the project you want to add the package in. If none is specified, the project specified when you logged in will be used. If none was specified at that time, an error will be displayed.
[terzino@linux tuleap-cli]$ ./tuleap.php docman move --project=myproject --id=110501 --parent=110503
+--------+
| Result |
+--------+
| 1 |
+--------+
|
Example 54. move command
Copyright © Xerox Corporation, Codendi Team, 2001-2006. All Rights Reserved |