@Service public class ControllerOperationsImpl extends Object implements ControllerOperations
ControllerOperations.FEATURE_NAME| Constructor and Description |
|---|
ControllerOperationsImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context) |
void |
createClassFromTemplate(org.springframework.roo.project.maven.Pom module,
String templateName,
String className,
String packageLastElement)
Creates a class from a template
|
void |
createController(org.springframework.roo.model.JavaType controller,
org.springframework.roo.model.JavaType entity,
org.springframework.roo.model.JavaType service,
String path,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage formattersPackage)
This operation will generate a new controller with the specified
information
|
void |
createControllerForAllEntities(org.springframework.roo.model.JavaPackage controllersPackage,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage formattersPackage)
This operation will generate a new controller for every class annotated
with @RooJpaEntity on current project.
|
org.springframework.roo.application.config.ApplicationConfigService |
getApplicationConfigService() |
org.springframework.roo.process.manager.FileManager |
getFileManager() |
Map<String,ControllerMVCResponseService> |
getInstalledControllerMVCResponseTypes()
This method gets all implementations of ControllerMVCResponseService
interface to be able to locate all installed ControllerMVCResponseService
|
String |
getName() |
org.springframework.roo.project.PathResolver |
getPathResolver() |
org.springframework.roo.shell.Converter<org.springframework.roo.project.maven.Pom> |
getPomConverter()
This method obtains Pom converter to be able to obtain Pom module from
strings
|
org.springframework.roo.project.ProjectOperations |
getProjectOperations() |
org.springframework.roo.classpath.TypeLocationService |
getTypeLocationService() |
org.springframework.roo.classpath.TypeManagementService |
getTypeManagementService() |
boolean |
isAddControllerAvailable()
This operation will check if add controllers operation is available
|
boolean |
isInstalledInModule(String moduleName) |
boolean |
isSetupAvailable()
This operation will check if setup operation is available
|
void |
setup(org.springframework.roo.project.maven.Pom module,
ServerProvider appServer)
This operation will setup Spring MVC on generated project.
|
void |
updateController(org.springframework.roo.model.JavaType controller,
ControllerMVCResponseService responseType)
Adds provided response type to existing controller
|
protected void activate(org.osgi.service.component.ComponentContext context)
public boolean isSetupAvailable()
isSetupAvailable in interface ControllerOperationspublic void setup(org.springframework.roo.project.maven.Pom module,
ServerProvider appServer)
setup in interface ControllerOperationsmodule - Pom module where Spring MVC should be includedappServer - Server where application should be deployedpublic boolean isAddControllerAvailable()
isAddControllerAvailable in interface ControllerOperationspublic void createControllerForAllEntities(org.springframework.roo.model.JavaPackage controllersPackage,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage formattersPackage)
createControllerForAllEntities in interface ControllerOperationscontrollersPackage - responseType - formattersPackage - public void createController(org.springframework.roo.model.JavaType controller,
org.springframework.roo.model.JavaType entity,
org.springframework.roo.model.JavaType service,
String path,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage formattersPackage)
createController in interface ControllerOperationscontroller - entity - service - path - responseType - formattersPackage - public void updateController(org.springframework.roo.model.JavaType controller,
ControllerMVCResponseService responseType)
ControllerOperationsupdateController in interface ControllerOperationspublic void createClassFromTemplate(org.springframework.roo.project.maven.Pom module,
String templateName,
String className,
String packageLastElement)
module - the Pom related to modeule where the class should be createdtemplateName - the String with the template nameclassName - the String with the class name to createpackageLastElement - the String (optional) with the last element of the package, which will be appended to module artifactId. If null, package will be module artifactIdpublic org.springframework.roo.classpath.TypeLocationService getTypeLocationService()
public org.springframework.roo.project.ProjectOperations getProjectOperations()
public org.springframework.roo.project.PathResolver getPathResolver()
public org.springframework.roo.process.manager.FileManager getFileManager()
public org.springframework.roo.classpath.TypeManagementService getTypeManagementService()
public org.springframework.roo.application.config.ApplicationConfigService getApplicationConfigService()
public org.springframework.roo.shell.Converter<org.springframework.roo.project.maven.Pom> getPomConverter()
public Map<String,ControllerMVCResponseService> getInstalledControllerMVCResponseTypes()
public String getName()
getName in interface org.springframework.roo.project.Featurepublic boolean isInstalledInModule(String moduleName)
isInstalledInModule in interface org.springframework.roo.project.FeatureCopyright © 2009–2016. All rights reserved.