Package org.alfresco.repo.tenant
Class TenantInterpreter
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.repo.admin.BaseInterpreter
-
- org.alfresco.repo.tenant.TenantInterpreter
-
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,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
Fields Modifier and Type Field Description protected TenantServicetenantService-
Fields inherited from class org.alfresco.repo.admin.BaseInterpreter
authorityService, lastCommand, transactionService
-
-
Constructor Summary
Constructors Constructor Description TenantInterpreter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()StringexecuteCommand(String line)Execute a single command using the BufferedReader passed in for any data needed.StringgetBaseAdminUsername()protected booleanhasAuthority(String username)StringinterpretCommand(String line)Interpret a single command using the BufferedReader passed in for any data needed.static voidmain(String[] args)Main entry point.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetAuthenticationService(MutableAuthenticationService authenticationService)voidsetBaseAdminUsername(String baseAdminUsername)voidsetTenantAdminService(TenantAdminService tenantAdminService)voidsetTenantService(TenantService tenantService)-
Methods inherited from class org.alfresco.repo.admin.BaseInterpreter
getConsoleBean, getCurrentUserName, onBootstrap, onShutdown, rep, runMain, runMain, setAuthorityService, setCurrentUserName, setTransactionService
-
-
-
-
Field Detail
-
tenantService
protected TenantService tenantService
-
-
Method Detail
-
setTenantAdminService
public void setTenantAdminService(TenantAdminService tenantAdminService)
-
setAuthenticationService
public void setAuthenticationService(MutableAuthenticationService authenticationService)
-
setTenantService
public void setTenantService(TenantService tenantService)
-
setBaseAdminUsername
public void setBaseAdminUsername(String baseAdminUsername)
-
getBaseAdminUsername
public String getBaseAdminUsername()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Overrides:
setApplicationContextin classorg.springframework.extensions.surf.util.AbstractLifecycleBean- Throws:
org.springframework.beans.BeansException
-
main
public static void main(String[] args)
Main entry point.
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
hasAuthority
protected boolean hasAuthority(String username)
- Overrides:
hasAuthorityin classBaseInterpreter
-
interpretCommand
public String interpretCommand(String line) throws IOException
Description copied from class:BaseInterpreterInterpret a single command using the BufferedReader passed in for any data needed.- Overrides:
interpretCommandin classBaseInterpreter- Parameters:
line- The unparsed command- Returns:
- The textual output of the command.
- Throws:
IOException
-
executeCommand
public String executeCommand(String line) throws IOException
Execute a single command using the BufferedReader passed in for any data needed. TODO: Use decent parser!- Specified by:
executeCommandin classBaseInterpreter- Parameters:
line- The unparsed command- Returns:
- The textual output of the command.
- Throws:
IOException
-
-