@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 |
createOrUpdateControllerForAllEntities(ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage controllerPackage,
String pathPrefix)
This operation will generate or update a controller for every class
annotated with @RooJpaEntity
|
void |
createOrUpdateControllerForEntity(org.springframework.roo.model.JavaType entity,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage controllerPackage,
String pathPrefix)
This operation will generate or update a controller for a specified
entity
|
void |
createOrUpdateDetailControllerForEntity(org.springframework.roo.model.JavaType entity,
String relationField,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage controllerPackage)
This operation will generate or update a level detail controller for a
specified field located in specified entity
|
void |
createOrUpdateDetailControllersForAllEntities(ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage controllerPackage)
This operation will generate or update a first level detail controller
for every class annotated with @RooJpaEntity that has defined a @RooController
|
void |
exportOperation(org.springframework.roo.model.JavaType controller,
List<String> operations)
Generate the operations selected in the controller indicated
|
List<String> |
getAllMethodsToPublish(String currentService,
String currentController)
Get all the methods that can be published from the service or the controller established by parameter
|
String |
getBasePathForController(org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails controller)
Gets base Path for referenced controller
|
String |
getBasePathForController(org.springframework.roo.model.JavaType controller)
Gets base Path for referenced controller
|
String |
getBaseUrlControllerForFinder(org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails controller,
String finder)
Gets finder base URL for referenced controller
|
String |
getBaseUrlControllerForFinder(org.springframework.roo.model.JavaType controller,
String finder)
Gets finder base URL for referenced controller
|
String |
getBaseUrlForController(org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails controller)
Gets base URL for referenced controller
|
String |
getBaseUrlForController(org.springframework.roo.model.JavaType controller)
Gets base URL for referenced controller
|
Map<String,ControllerMVCResponseService> |
getInstalledControllerMVCResponseTypes()
This method gets all implementations of ControllerMVCResponseService
interface to be able to locate all installed ControllerMVCResponseService
|
String |
getName() |
List<RelationInfoExtended> |
getRelationInfoFor(org.springframework.roo.model.JavaType entity,
String path)
Return a list of
RelationInfoExtended for a field relation path of a entity. |
List<RelationInfoExtended> |
getRelationInfoFor(org.springframework.roo.addon.jpa.addon.entity.JpaEntityMetadata entityMetadata,
String path)
Return a list of
RelationInfoExtended for a field relation path of a entity. |
boolean |
isAddControllerAvailable()
This operation will check if add controllers operation is available
|
boolean |
isAddDetailControllerAvailable()
This operation will check if add detail controllers operation is
available
|
boolean |
isInstalledInModule(String moduleName) |
boolean |
isPublishOperationsAvailable()
This operation will check if the operation publish services methods is
available
|
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.
|
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 boolean isAddDetailControllerAvailable()
isAddDetailControllerAvailable in interface ControllerOperationspublic boolean isPublishOperationsAvailable()
isPublishOperationsAvailable in interface ControllerOperationspublic void createOrUpdateControllerForAllEntities(ControllerMVCResponseService responseType, org.springframework.roo.model.JavaPackage controllerPackage, String pathPrefix)
createOrUpdateControllerForAllEntities in interface ControllerOperationsresponseType - View provider to usecontrollerPackage - Package where is situated the controllerpathPrefix - Prefix to use in RequestMappingpublic void createOrUpdateControllerForEntity(org.springframework.roo.model.JavaType entity,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage controllerPackage,
String pathPrefix)
ControllerOperationscreateOrUpdateControllerForEntity in interface ControllerOperationsentity - Entity over which create the controllerresponseType - View provider to usecontrollerPackage - Package where is situated the controllerpathPrefix - Prefix to use in RequestMappingpublic 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 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.Featurepublic void createOrUpdateDetailControllersForAllEntities(ControllerMVCResponseService responseType, org.springframework.roo.model.JavaPackage controllerPackage)
ControllerOperationscreateOrUpdateDetailControllersForAllEntities in interface ControllerOperationsresponseType - View provider to usecontrollerPackage - Package where is situated the controllerpublic void createOrUpdateDetailControllerForEntity(org.springframework.roo.model.JavaType entity,
String relationField,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage controllerPackage)
ControllerOperationscreateOrUpdateDetailControllerForEntity in interface ControllerOperationsentity - Entity over which create the controllerrelationField - Field that set the relationshipresponseType - View provider to usecontrollerPackage - Package where is situated the controllerpublic List<String> getAllMethodsToPublish(String currentService, String currentController)
getAllMethodsToPublish in interface ControllerOperationscurrentService - Service from which obtain methodscurrentController - Controller from which obtain methodspublic void exportOperation(org.springframework.roo.model.JavaType controller,
List<String> operations)
exportOperation in interface ControllerOperationscontroller - Controller where the operations will be createdoperations - Service operations names that will be createdpublic List<RelationInfoExtended> getRelationInfoFor(org.springframework.roo.model.JavaType entity, String path)
ControllerOperationsRelationInfoExtended for a field relation path of a entity.
path is split by dot char and every return item is information for every path element.
by example: entity could be Customer and path "order.details"getRelationInfoFor in interface ControllerOperationspublic List<RelationInfoExtended> getRelationInfoFor(org.springframework.roo.addon.jpa.addon.entity.JpaEntityMetadata entityMetadata, String path)
ControllerOperationsRelationInfoExtended for a field relation path of a entity.
path is split by dot char and every return item is information for every path element.
by example: entity could be Customer and path "order.details"getRelationInfoFor in interface ControllerOperationspublic String getBaseUrlForController(org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails controller)
ControllerOperationsgetBaseUrlForController in interface ControllerOperationscontroller - details correctly annotated with RooControllerpublic String getBaseUrlForController(org.springframework.roo.model.JavaType controller)
ControllerOperationsgetBaseUrlForController in interface ControllerOperationscontroller - JavaType correctly annotated with RooControllerpublic String getBaseUrlControllerForFinder(org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails controller, String finder)
ControllerOperationsgetBaseUrlControllerForFinder in interface ControllerOperationscontroller - details correctly annotated with RooController and RooSearchfinder - target. Should be one of RooSearch.finders()public String getBaseUrlControllerForFinder(org.springframework.roo.model.JavaType controller, String finder)
ControllerOperationsgetBaseUrlControllerForFinder in interface ControllerOperationscontroller - JavaType correctly annotated with RooController and RooSearchfinder - target. Should be one of RooSearch.finders()public String getBasePathForController(org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails controller)
ControllerOperationsgetBasePathForController in interface ControllerOperationscontroller - details correctly annotated with RooControllerpublic String getBasePathForController(org.springframework.roo.model.JavaType controller)
ControllerOperationsgetBasePathForController in interface ControllerOperationscontroller - JavaType correctly annotated with RooControllerCopyright © 2009–2016. All rights reserved.