|
|||||||||
| Home >> All >> com >> opencms >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.core
Class CmsShellCommands

java.lang.Objectcom.opencms.core.CmsShellCommands
- All Implemented Interfaces:
- I_CmsConstants
- class CmsShellCommands
- extends java.lang.Object
- implements I_CmsConstants
- extends java.lang.Object
This class is a commad line interface to OpenCms which can be used for the initial setup and to test the system.
- Version:
- $Revision: 1.67 $ $Date: 2003/03/19 08:43:10 $
| Field Summary | |
private com.opencms.file.CmsObject |
m_cms
The CmsObject object which provides access to the VFS.. |
private OpenCms |
m_openCms
The wrapped OpenCms object which provides the system environment. |
| Constructor Summary | |
CmsShellCommands(OpenCms openCms,
com.opencms.file.CmsObject cms)
Generate a new instance of CmsShellCommands. |
|
| Method Summary | |
void |
acceptTask(java.lang.String taskId)
Accept a task from the Cms. |
void |
accessCreate(java.lang.String resource)
Checks, if the user may create this resource. |
void |
accessLock(java.lang.String resource)
Checks, if the user may lock this resource. |
void |
accessProject(java.lang.String id)
Tests if the user can access the project. |
void |
accessRead(java.lang.String resource)
Checks, if the user may read this resource. |
void |
accessWrite(java.lang.String resource)
Tests if the user can write the resource. |
void |
addFileExtension(java.lang.String extension,
java.lang.String resourceType)
adds a file extension. |
void |
addGroup(java.lang.String name,
java.lang.String description)
Adds a Group to the cms. |
void |
addGroup(java.lang.String name,
java.lang.String description,
java.lang.String flags,
java.lang.String parent)
Adds a Group to the cms. |
void |
addUser(java.lang.String name,
java.lang.String password,
java.lang.String group,
java.lang.String description)
Adds a user to the cms. |
void |
addUser(java.lang.String name,
java.lang.String password,
java.lang.String group,
java.lang.String description,
java.lang.String flags)
Adds a user to the cms. |
void |
addUser(java.lang.String name,
java.lang.String password,
java.lang.String group,
java.lang.String description,
java.lang.String firstname,
java.lang.String lastname,
java.lang.String email)
Adds a user to the cms. |
void |
addUserToGroup(java.lang.String username,
java.lang.String groupname)
Adds a user to a group. |
void |
addWebUser(java.lang.String name,
java.lang.String password,
java.lang.String group,
java.lang.String description,
java.lang.String flags)
Adds a web user to the Cms. |
void |
addWebUser(java.lang.String name,
java.lang.String password,
java.lang.String group,
java.lang.String additionalGroup,
java.lang.String description,
java.lang.String flags)
Adds a web user to the Cms. |
void |
anonymousUser()
Returns the anonymous user object. |
void |
changeUserType(java.lang.String username,
java.lang.String userType)
Changes the type of the user to webusertype |
void |
changeUserTypeByUserid(java.lang.String userId,
java.lang.String userType)
Changes the type of the user |
void |
chgrp(java.lang.String filename,
java.lang.String newGroup)
Changes the group for this resource The user may change this, if he is admin of the resource. |
void |
chmod(java.lang.String filename,
java.lang.String flags)
Changes the flags for this resource The user may change the flags, if he is admin of the resource. |
void |
chown(java.lang.String filename,
java.lang.String newOwner)
Changes the owner for this resource The user may change this, if he is admin of the resource. |
void |
chtype(java.lang.String filename,
java.lang.String newType)
Changes the resourcetype for this resource The user may change this, if he is admin of the resource. |
void |
clearcache()
Clears all internal DB-Caches. |
void |
copyFile(java.lang.String source,
java.lang.String destination)
Copies the file. |
void |
copyFolder(java.lang.String source,
java.lang.String destination)
Copies a folder. |
void |
copyResource(java.lang.String source,
java.lang.String destination)
Copies a resource. |
void |
copyResourceToProject(java.lang.String resource)
Copies a resource from the online project to a new, specified project. Copying a resource will copy the file header or folder into the specified offline project and set its state to UNCHANGED. |
void |
copyright()
Returns a copyright-string for this OpenCms. |
void |
countLockedResources(java.lang.String id)
Counts the locked resources in a project. |
void |
createDefaultProject(java.lang.String name,
java.lang.String description)
Creates a default cms project. |
void |
createFolder(java.lang.String folder,
java.lang.String newFolderName)
Creates a new folder. |
void |
createModule(java.lang.String modulename,
java.lang.String niceModulename,
java.lang.String description,
java.lang.String author,
java.lang.String type,
java.lang.String createDate,
java.lang.String version)
This method creates a new module in the repository. |
void |
createProject(java.lang.String name,
java.lang.String description,
java.lang.String groupname,
java.lang.String managergroupname)
Creates a project. |
void |
createProject(java.lang.String name,
java.lang.String description,
java.lang.String groupname,
java.lang.String managergroupname,
java.lang.String projecttype)
Creates a project. |
void |
createPropertydefinition(java.lang.String name,
java.lang.String resourcetype)
Creates the propertydefinition for the resource type. |
void |
createTask(java.lang.String agentName,
java.lang.String roleName,
java.lang.String taskname,
java.lang.String taskcomment,
java.lang.String timeout,
java.lang.String priority)
Creates a new task. |
void |
createTask(java.lang.String projectid,
java.lang.String agentName,
java.lang.String roleName,
java.lang.String taskname,
java.lang.String taskcomment,
java.lang.String tasktype,
java.lang.String timeout,
java.lang.String priority)
Creates a new task. |
void |
createTempfileProject()
Creates a new project for the temporary files. |
void |
deleteAllProperties(java.lang.String resource)
Deletes all propertyinformation for a file or folder. |
void |
deleteBackups(java.lang.String weeks)
Deletes the versions from the backup tables that are older then the given weeks |
void |
deleteFile(java.lang.String filename)
Deletes the file. |
void |
deleteFolder(java.lang.String foldername)
Deletes the folder. |
void |
deleteGroup(java.lang.String delgroup)
Delete a group from the Cms. |
void |
deleteModule(java.lang.String module)
Deletes a module from the cms. |
void |
deleteModuleView(java.lang.String modulename)
This method deletes the view for an module. |
void |
deleteProject(java.lang.String id)
Deletes a project. |
void |
deleteProperty(java.lang.String resourcename,
java.lang.String property)
Deletes a propertyinformation for a file or folder. |
void |
deletepropertydefinition(java.lang.String name,
java.lang.String resourcetype)
Delete the propertydefinition for the resource type. |
void |
deleteResource(java.lang.String filename)
Deletes a Resource. |
void |
deleteUser(java.lang.String name)
Deletes a user from the Cms. |
void |
deleteWebUser(java.lang.String userId)
Deletes a web user from the Cms. |
void |
echo(java.lang.String echo)
Echos the input to output. |
void |
endTask(java.lang.String taskid)
Ends a task of the Cms. |
void |
exit()
Exits the commandline-interface |
void |
exportAllResources(java.lang.String exportFile)
Exports cms-resources to zip. |
void |
exportAllResourcesOnlyChanged(java.lang.String exportFile)
Exports cms-resources to zip. |
void |
exportModule(java.lang.String modulename,
java.lang.String resource,
java.lang.String filename)
Exports a module. |
void |
exportResources(java.lang.String exportFile,
java.lang.String pathList)
Exports cms-resources to zip. |
void |
exportResourcesAndUserdata(java.lang.String exportFile,
java.lang.String pathList)
Exports cms-resources to zip. |
void |
exportResourcesOnlyChanged(java.lang.String exportFile,
java.lang.String pathList)
Exports cms-resources to zip. |
void |
forwardTask(java.lang.String taskid,
java.lang.String newRoleName,
java.lang.String newUserName)
Forwards a task to a new user. |
void |
getAllAccessibleProjects()
Returns all projects, which the user may access. |
void |
getAllBackupProjects()
Returns the project history |
void |
getAllManageableProjects()
Returns all projects which are owned by the current user or which are manageable for the group of the user. |
void |
getAllResourceTypes()
Returns all I_CmsResourceTypes. |
void |
getCacheInfo()
Gets information about the cache size. |
void |
getChild(java.lang.String groupname)
Returns all child groups of a group |
void |
getChilds(java.lang.String groupname)
Returns all child groups of a group This method also returns all sub-child groups of the current group. |
void |
getCurrentProject()
Returns the current project for the user. |
void |
getDirectGroupsOfUser(java.lang.String username)
Gets all groups to which a given user directly belongs. |
void |
getFilesInFolder(java.lang.String foldername)
Returns a Vector with all subfiles. |
void |
getFilesWithProperty(java.lang.String propertyDefinition,
java.lang.String propertyValue)
Returns a Vector with all resource-names of the resources that have set the given property to the given value. |
void |
getFileSystemChanges()
This method can be called, to determine if the file-system was changed in the past. |
void |
getFolderTree()
Returns a Vector with the complete folder-tree for this project. Subfolders can be read from an offline project and the online project. |
void |
getGroups()
Returns all users of the cms. |
void |
getGroupsOfUser(java.lang.String username)
Returns all groups of a user. |
void |
getModuleFiles(java.lang.String name)
Prints out all files for a module. |
void |
getModuleInfo()
Imports a module into the cms. |
void |
getModuleInfo(java.lang.String name)
Prints out informations about a module. |
void |
getParent(java.lang.String groupname)
Returns the parent group of a group. |
void |
getResourcesInFolder(java.lang.String folder)
Returns a Vector with the subresources for a folder. |
void |
getResourcesWithProperty(java.lang.String propertyDefinition,
java.lang.String propertyValue,
java.lang.String resourceType)
Returns a Vector with all resources of the given type that have set the given property to the given value. |
void |
getResourceType(java.lang.String resourceType)
Returns a CmsResourceTypes. |
void |
getSubFolders(java.lang.String foldername)
Returns a Vector with all subfolders. |
void |
getSystemValue(java.lang.String key)
Returns a value for a system-key. |
void |
getSystemValues(java.lang.String sysKey)
Returns all values for a system-key. |
void |
getTaskPar(java.lang.String taskid,
java.lang.String parname)
Get a parameter value for a task. |
void |
getTaskType(java.lang.String taskname)
Get the template task id fo a given taskname. |
void |
getUsers()
Returns all users of the cms. |
void |
getUsers(java.lang.String type)
Returns all users of the given type in the Cms. |
void |
getUsersByLastname(java.lang.String Lastname,
java.lang.String userType,
java.lang.String userStatus,
java.lang.String wasLoggedIn,
java.lang.String nMax)
Returns all groups of a user. |
void |
getUsersOfGroup(java.lang.String groupname)
Returns all groups of a user. |
void |
getViews()
Imports a module into the cms. |
void |
help()
Prints all possible commands. |
void |
help(java.lang.String searchString)
Prints signature of all possible commands containing a certain string. May also be used to print signature of a specific command by giving full command name. |
private byte[] |
importFile(java.lang.String filename)
Reads a given file from the local harddisk and uploads it to the OpenCms system. |
void |
importFolder(java.lang.String importFile,
java.lang.String importPath)
Imports a import-resource (folder or zipfile) to the cms. |
void |
importGetConflictingFileNames(java.lang.String moduleZip)
Checks for conflicting file names for a import. |
void |
importGetResourcesForProject(java.lang.String moduleZip)
Checks for resources that should be copied to the import-project. |
void |
importModule(java.lang.String importFile)
Imports a module (zipfile) to the cms. |
void |
importModuleFromDefault(java.lang.String importFile)
Imports a module (zipfile) from the default module directory, creating a temporary project for this. |
void |
importResources(java.lang.String importFile)
Imports an import-resource (folder or zipfile) to the cms. |
void |
importResources(java.lang.String importFile,
java.lang.String importPath)
Imports an import-resource (folder or zipfile) to the cms. |
void |
importResourcesWithTempProject(java.lang.String importFile)
Imports an import-resource (folder or zipfile) to the cms, and generates a special temp project for that import which is published right after the file has successfully been imported. |
void |
isAdmin()
Determines, if the user is Admin. |
void |
isProjectManager()
Determines, if the user is Projectleader. |
void |
lockedBy(java.lang.String resource)
Returns the user, who has locked a given resource. |
void |
lockResource(java.lang.String resource)
Locks a resource A user can lock a resource, so he is the only one who can write this resource. |
void |
lockResource(java.lang.String resource,
java.lang.String force)
Locks a given resource. |
void |
login(java.lang.String username,
java.lang.String password)
Logs a user into the system. |
void |
loginUser(java.lang.String username,
java.lang.String password)
Logs a user into the system. |
void |
loginWebUser(java.lang.String username,
java.lang.String password)
Logs a web user into the Cms, if the password is correct. |
void |
moveFile(java.lang.String source,
java.lang.String destination)
Moves a file to the given destination. |
void |
moveResource(java.lang.String source,
java.lang.String destination)
Moves a resource to the given destination. |
void |
onlineProject()
Reads a the online-project from the Cms. |
void |
printHelpText()
Prints help text when Shell is startet. |
void |
publishProject(java.lang.String id)
Publishes a project. |
void |
publishResource(java.lang.String resourceName)
Publishes a resource in the current project. |
void |
quit()
Exits the commandline-interface |
void |
readAgent(java.lang.String taskId)
Reads the agent of a task from the OpenCms. |
void |
readAllFileHeadersForHist(java.lang.String filename)
Reads all file headers of a file in the OpenCms. This method returns a vector with the histroy of all file headers, i.e. |
void |
readAllPropertydefinitions(java.lang.String resourcetype)
Reads all propertydefinitions for the given resource type. |
void |
readCronTable()
Gets the Crontable. |
void |
readExportPath()
Reads the export-path for the system. |
void |
readFile(java.lang.String filename)
Reads a file from the Cms. |
void |
readFileContent(java.lang.String filename)
Reads a file from the Cms. |
void |
readFileExtensions()
Gets the known file extensions (=suffixes). |
void |
readFileHeader(java.lang.String filename)
Reads a file header from the Cms. The reading excludes the filecontent. |
void |
readFileHeaders(java.lang.String projectId)
Reads all file headers of a project from the Cms. |
void |
readFolder(java.lang.String folder)
Reads a folder from the Cms. |
void |
readGivenTasks(java.lang.String projectId,
java.lang.String ownerName,
java.lang.String taskType,
java.lang.String orderBy,
java.lang.String sort)
Reads all given tasks from a user for a project. |
void |
readGroup(java.lang.String groupname)
Returns a group in the Cms. |
void |
readGroupById(java.lang.String groupid)
Returns a group in the Cms. |
void |
readGroupOfProject(java.lang.String project)
Reads the group of a project from the OpenCms. |
void |
readGroupOfResource(java.lang.String resource)
Reads the group of a resource from the Cms. |
void |
readGroupOfTask(java.lang.String task)
Reads the group (role) of a task from the Cms. |
void |
readManagerGroup(java.lang.String project)
Reads the managergroup of a project from the Cms. |
void |
readMimeTypes()
Gets all CmsMountPoints. |
void |
readOriginalAgent(java.lang.String task)
Reads the original agent of a task from the Cms. |
void |
readOwnerOfProject(java.lang.String project)
Reads the owner of a project from the Cms. |
void |
readOwnerOfResource(java.lang.String resource)
Reads the owner of a resource from the Cms. |
void |
readOwnerOfTask(java.lang.String task)
Reads the owner (initiator) of a task from the Cms. |
void |
readProject(java.lang.String id)
Reads a project from the Cms. |
void |
readProjectLogs(java.lang.String projectId)
Reads log entries for a project. |
void |
readProjectOfResource(java.lang.String res)
Reads a project from the Cms. |
void |
readProjectOfTask(java.lang.String task)
Reads a project from the Cms. |
void |
readProperties(java.lang.String resource)
Returns a list of all propertyinformations of a file or folder. |
void |
readProperty(java.lang.String name,
java.lang.String property)
Returns a propertyinformation of a file or folder. |
void |
readPropertydefinition(java.lang.String name,
java.lang.String resourcetype)
Reads the propertydefinition for the resource type. |
void |
readResourcesLikeName(java.lang.String resourcename)
Returns the resources that contains the given part in the resourcename. Security: Access is granted, if: the user has access to the project the user can read and view this resource |
void |
readTask(java.lang.String id)
Reads the task with the given id. |
void |
readTaskLogs(java.lang.String taskid)
Reads log entries for a task. |
void |
readTasksForProject(java.lang.String projectId,
java.lang.String tasktype,
java.lang.String orderBy,
java.lang.String sort)
Reads all tasks for a project. |
void |
readTasksForRole(java.lang.String projectId,
java.lang.String roleName,
java.lang.String tasktype,
java.lang.String orderBy,
java.lang.String sort)
Reads all tasks for a role in a project. |
void |
readTasksForUser(java.lang.String projectId,
java.lang.String userName,
java.lang.String tasktype,
java.lang.String orderBy,
java.lang.String sort)
Reads all tasks for a user in a project. |
void |
readUser(java.lang.String username)
Returns a user object. |
void |
readUser(java.lang.String username,
java.lang.String password)
Returns a user object. |
void |
readWebUser(java.lang.String username)
Returns a user object. |
void |
readWebUser(java.lang.String username,
java.lang.String password)
Returns a user object. |
void |
reaktivateTask(java.lang.String taskId)
Reactivates a task from the Cms. |
void |
recoverPassword(java.lang.String username,
java.lang.String recPassword,
java.lang.String newPassword)
Recovers the password for a user. |
void |
removeUserFromGroup(java.lang.String username,
java.lang.String groupname)
Removes a user from a group. |
void |
renameFile(java.lang.String oldname,
java.lang.String newname)
Renames the file to the new name. |
void |
renameResource(java.lang.String oldname,
java.lang.String newname)
Renames the resource to the new name. |
void |
restoreResource(java.lang.String versionId,
java.lang.String filename)
Restores a file in the current project with a version in the backup |
void |
rootFolder()
Returns the root-folder object. |
void |
setContextToCos()
Sets the name of the current site root of the content objects system |
void |
setContextToVfs()
Sets the name of the current site root of the content objects system |
void |
setCurrentProject(java.lang.String id)
Sets the current project for the user. |
void |
setModuleAuthor(java.lang.String modulename,
java.lang.String author)
This method sets the author of the module. |
void |
setModuleAuthorEmail(java.lang.String modulename,
java.lang.String email)
This method sets the email of author of the module. |
void |
setModuleCreateDate(java.lang.String modulname,
java.lang.String createdate)
Sets the create date of the module. |
void |
setModuleDescription(java.lang.String module,
java.lang.String description)
Sets the description of the module. |
void |
setModuleDocumentPath(java.lang.String modulename,
java.lang.String url)
Sets the url to the documentation of the module. |
void |
setModuleMaintenanceEventClass(java.lang.String modulname,
java.lang.String classname)
Sets the classname, that receives all maintenance-events for the module. |
void |
setModuleNiceName(java.lang.String module,
|
JAVADOC
com.opencms.core.CmsShellCommands