## com.imcode.imcms.api
Class ContentManagementSystem

    java.lang.Object
      com.imcode.imcms.api.ContentManagementSystem

Direct Known Subclasses:
  DefaultContentManagementSystem, MockContentManagementSystem

    public abstract class ContentManagementSystem

extends java.lang.Object

Constructor Summary
`ContentManagementSystem()`

Method Summary
`static ContentManagementSystem` `fromRequest(javax.servlet.ServletRequest request)`
`static ContentManagementSystem` `getContentManagementSystem(java.lang.String userName, java.lang.String password)` Get a ContentManagementSystem for the given username and password.
`abstract User` `getCurrentUser()`
`abstract DatabaseService` `getDatabaseService()`
`abstract DocumentService` `getDocumentService()`
`abstract MailService` `getMailService()`
`abstract TemplateService` `getTemplateService()`
`abstract UserService` `getUserService()`
`static ContentManagementSystem` `login(javax.servlet.http.HttpServletRequest request, java.lang.String username, java.lang.String password)` Try to login the current user with the given name and password.
`abstract void` `runAsSuperadmin(ContentManagementSystemRunnable runnable)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContentManagementSystem

    public ContentManagementSystem()

Method Detail

### getUserService

    public abstract UserService getUserService()

### getDocumentService

    public abstract DocumentService getDocumentService()

### getCurrentUser

    public abstract User getCurrentUser()

### getDatabaseService

    public abstract DatabaseService getDatabaseService()

### getTemplateService

    public abstract TemplateService getTemplateService()

### getMailService

    public abstract MailService getMailService()

### runAsSuperadmin

    public abstract void runAsSuperadmin(ContentManagementSystemRunnable runnable)
                                  throws NoPermissionException

  Throws:
    `NoPermissionException`

### getContentManagementSystem

    public static ContentManagementSystem getContentManagementSystem(java.lang.String userName,
                                                                     java.lang.String password)

  Get a ContentManagementSystem for the given username and password.

### login

    public static ContentManagementSystem login(javax.servlet.http.HttpServletRequest request,
                                                java.lang.String username,
                                                java.lang.String password)

  Try to login the current user with the given name and password.

  Parameters:
    `request` -
    `username` -
    `password` -
  Returns:
    The new ContentManagementSystem, or null if the login failed.

### fromRequest

    public static ContentManagementSystem fromRequest(javax.servlet.ServletRequest request)

  Returns:
    The ContentManagementSystem for the request
  Since:
    2.0