org.alfresco.repo.tenant
Class TenantInterpreter

java.lang.Object
  extended by org.springframework.extensions.surf.util.AbstractLifecycleBean
      extended by org.alfresco.repo.admin.BaseInterpreter
          extended by org.alfresco.repo.tenant.TenantInterpreter
All Implemented Interfaces:
java.util.EventListener, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class TenantInterpreter
extends BaseInterpreter
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean

An interactive console for Tenants.


Field Summary
protected  org.alfresco.repo.tenant.TenantService tenantService
           
 
Fields inherited from class org.alfresco.repo.admin.BaseInterpreter
authorityService, lastCommand, transactionService
 
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log
 
Constructor Summary
TenantInterpreter()
           
 
Method Summary
 void afterPropertiesSet()
           
 java.lang.String executeCommand(java.lang.String line)
          Execute a single command using the BufferedReader passed in for any data needed.
 java.lang.String getBaseAdminUsername()
           
protected  boolean hasAuthority(java.lang.String username)
           
 java.lang.String interpretCommand(java.lang.String line)
          Interpret a single command using the BufferedReader passed in for any data needed.
static void main(java.lang.String[] args)
          Main entry point.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setAuthenticationService(MutableAuthenticationService authenticationService)
           
 void setBaseAdminUsername(java.lang.String baseAdminUsername)
           
 void setTenantAdminService(TenantAdminService tenantAdminService)
           
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 
Methods inherited from class org.alfresco.repo.admin.BaseInterpreter
getConsoleBean, getCurrentUserName, onBootstrap, onShutdown, rep, runMain, runMain, setAuthorityService, setCurrentUserName, setTransactionService
 
Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tenantService

protected org.alfresco.repo.tenant.TenantService tenantService
Constructor Detail

TenantInterpreter

public TenantInterpreter()
Method Detail

setTenantAdminService

public void setTenantAdminService(TenantAdminService tenantAdminService)

setAuthenticationService

public void setAuthenticationService(MutableAuthenticationService authenticationService)

setTenantService

public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)

setBaseAdminUsername

public void setBaseAdminUsername(java.lang.String baseAdminUsername)

getBaseAdminUsername

public java.lang.String getBaseAdminUsername()

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Overrides:
setApplicationContext in class org.springframework.extensions.surf.util.AbstractLifecycleBean
Throws:
org.springframework.beans.BeansException

main

public static void main(java.lang.String[] args)
Main entry point.


afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

hasAuthority

protected boolean hasAuthority(java.lang.String username)
Overrides:
hasAuthority in class BaseInterpreter

interpretCommand

public java.lang.String interpretCommand(java.lang.String line)
                                  throws java.io.IOException
Description copied from class: BaseInterpreter
Interpret a single command using the BufferedReader passed in for any data needed.

Overrides:
interpretCommand in class BaseInterpreter
Parameters:
line - The unparsed command
Returns:
The textual output of the command.
Throws:
java.io.IOException

executeCommand

public java.lang.String executeCommand(java.lang.String line)
                                throws java.io.IOException
Execute a single command using the BufferedReader passed in for any data needed. TODO: Use decent parser!

Specified by:
executeCommand in class BaseInterpreter
Parameters:
line - The unparsed command
Returns:
The textual output of the command.
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.