@Service public class ControllerCommands extends Object implements org.springframework.roo.shell.CommandMarker
| Constructor and Description |
|---|
ControllerCommands() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context) |
void |
addController(boolean all,
org.springframework.roo.model.JavaPackage controllersPackage,
org.springframework.roo.model.JavaType controller,
org.springframework.roo.model.JavaType entity,
org.springframework.roo.model.JavaType service,
String path,
String responseType,
org.springframework.roo.model.JavaPackage formattersPackage)
This method provides the Command definition to be able to generate
new Controllers on current project.
|
List<String> |
getAllAppServers(org.springframework.roo.shell.ShellContext context)
This indicator returns the servers where the application can be deployed
|
List<String> |
getAllResponseTypeValues(org.springframework.roo.shell.ShellContext context)
This indicator returns all possible values for --responseType parameter.
|
ControllerOperations |
getControllerOperations() |
Map<String,ControllerMVCResponseService> |
getInstalledControllerMVCResponseTypes()
This method gets all implementations of ControllerMVCResponseService interface to be able
to locate all installed ControllerMVCResponseService
|
org.springframework.roo.shell.Converter<org.springframework.roo.model.JavaType> |
getJavaTypeConverter()
This method obtains JavaType converter to be able to obtain JavaType
from strings
|
org.springframework.roo.project.ProjectOperations |
getProjectOperations() |
Map<String,ServerProvider> |
getServerProviders()
This method gets all implementations of ServerProvider interface to be able
to locate all availbale appServers
|
org.springframework.roo.classpath.TypeLocationService |
getTypeLocationService() |
boolean |
isAddControllerAvailable()
This indicator checks if is possible to add new controllers.
|
boolean |
isAllParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --all parameter should be visible or not
If --controller parameter has been specified, --all parameter will not be visible
to prevent conflicts.
|
boolean |
isClassParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --controller parameter should be visible or not
If --all parameter has been specified, --controller parameter will not be visible
to prevent conflicts.
|
boolean |
isEntityParameterMandatory(org.springframework.roo.shell.ShellContext context)
This indicator says if --entity parameter should be mandatory or not
If --controller parameter has not been specified, --entity parameter will be optional
If --controller parameter has been specified with an existing controller, --entity parameter will
be optional
If --controller parameter has been specified with new controller to be generated, --entity parameter
will be mandatory
|
boolean |
isEntityParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --entity parameter should be visible or not
If --controller parameter has not been specified, --entity parameter will not be visible
If --controller parameter has been specified with an existing controller, --entity parameter will
not be visible
If --controller parameter has been specified with new controller to be generated, --entity parameter
will be visible
|
boolean |
isFormattersPackageParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --formattersPackage parameter should be visible or not
If --controller parameter or --all parameter has been specified, --formattersPackage parameter will be visible
to preserve order.
|
boolean |
isModuleRequired(org.springframework.roo.shell.ShellContext shellContext)
This indicator checks if --module parameter should be mandatory or not.
|
boolean |
isModuleVisible(org.springframework.roo.shell.ShellContext shellContext)
This indicator checks if --module parameter should be visible or not.
|
boolean |
isPackageParameterMandatory(org.springframework.roo.shell.ShellContext context)
This indicator says if --package parameter should be mandatory or not
If --all parameter has been specified, --package parameter will be mandatory.
|
boolean |
isPackageParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --package parameter should be visible or not
If --all parameter has not been specified, --package parameter will not be visible
to prevent conflicts.
|
boolean |
isPathParameterMandatory(org.springframework.roo.shell.ShellContext context)
This indicator says if --path parameter should be mandatory or not
If --entity parameter has not been specified, --path parameter will be optional
If --entity parameter has specified and exists yet some controller that manages that
entity, --path parameter will be mandatory
If --entity parameter has specified and doesn't exist other controller that manages that entity,
--path parameter will be optional.
|
boolean |
isPathParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --path parameter should be visible or not
If --entity parameter has not been specified, --path parameter will not be visible
to preserve order.
|
boolean |
isResponseTypeParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --responseType parameter should be visible or not
If --controller parameter has not been specified, --responseType parameter will not be visible
to preserve order.
|
boolean |
isServiceParameterMandatory(org.springframework.roo.shell.ShellContext context)
This indicator says if --service parameter should be mandatory or not
If --entity parameter has been specified, --service parameter will be mandatory
|
boolean |
isServiceParameterVisible(org.springframework.roo.shell.ShellContext context)
This indicator says if --service parameter should be visible or not
If --entity parameter has not been specified, --service parameter will not be visible
to preserve order.
|
boolean |
isSetupAvailable()
This indicator checks if Spring MVC setup is available
If a valid project has been generated and Spring MVC has not been installed yet,
this command will be available.
|
List<String> |
returnControllerValues(org.springframework.roo.shell.ShellContext shellContext)
Find controllers in project and returns a list with their fully qualified names.
|
List<String> |
returnEntityValues(org.springframework.roo.shell.ShellContext shellContext)
Find entities in project and returns a list with their fully qualified names.
|
List<String> |
returnServiceValues(org.springframework.roo.shell.ShellContext shellContext)
Find entities in project and returns a list with their fully qualified names.
|
void |
setup(org.springframework.roo.project.maven.Pom module,
String appServer)
This method provides the Command definition to be able to include
Spring MVC on generated project.
|
protected void activate(org.osgi.service.component.ComponentContext context)
public boolean isModuleVisible(org.springframework.roo.shell.ShellContext shellContext)
shellContext - public boolean isModuleRequired(org.springframework.roo.shell.ShellContext shellContext)
shellContext - public List<String> getAllAppServers(org.springframework.roo.shell.ShellContext context)
context - public boolean isSetupAvailable()
public void setup(org.springframework.roo.project.maven.Pom module,
String appServer)
module - appServer - public boolean isAllParameterVisible(org.springframework.roo.shell.ShellContext context)
public boolean isPackageParameterVisible(org.springframework.roo.shell.ShellContext context)
public boolean isPackageParameterMandatory(org.springframework.roo.shell.ShellContext context)
public boolean isClassParameterVisible(org.springframework.roo.shell.ShellContext context)
public boolean isEntityParameterVisible(org.springframework.roo.shell.ShellContext context)
public boolean isEntityParameterMandatory(org.springframework.roo.shell.ShellContext context)
public boolean isServiceParameterVisible(org.springframework.roo.shell.ShellContext context)
public boolean isServiceParameterMandatory(org.springframework.roo.shell.ShellContext context)
public boolean isPathParameterVisible(org.springframework.roo.shell.ShellContext context)
public boolean isPathParameterMandatory(org.springframework.roo.shell.ShellContext context)
public boolean isResponseTypeParameterVisible(org.springframework.roo.shell.ShellContext context)
public List<String> getAllResponseTypeValues(org.springframework.roo.shell.ShellContext context)
context - public boolean isFormattersPackageParameterVisible(org.springframework.roo.shell.ShellContext context)
public boolean isAddControllerAvailable()
public List<String> returnEntityValues(org.springframework.roo.shell.ShellContext shellContext)
shellContext - public List<String> returnControllerValues(org.springframework.roo.shell.ShellContext shellContext)
shellContext - public List<String> returnServiceValues(org.springframework.roo.shell.ShellContext shellContext)
shellContext - public void addController(boolean all,
org.springframework.roo.model.JavaPackage controllersPackage,
org.springframework.roo.model.JavaType controller,
org.springframework.roo.model.JavaType entity,
org.springframework.roo.model.JavaType service,
String path,
String responseType,
org.springframework.roo.model.JavaPackage formattersPackage)
all - package - controller - entity - service - path - responseType - formattersPackage - public Map<String,ServerProvider> getServerProviders()
public Map<String,ControllerMVCResponseService> getInstalledControllerMVCResponseTypes()
public org.springframework.roo.classpath.TypeLocationService getTypeLocationService()
public org.springframework.roo.project.ProjectOperations getProjectOperations()
public ControllerOperations getControllerOperations()
public org.springframework.roo.shell.Converter<org.springframework.roo.model.JavaType> getJavaTypeConverter()
Copyright © 2009–2016. All rights reserved.