@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 |
createLinkFactoryClass(org.springframework.roo.model.JavaType controller)
Creates a new class which supports its associated controller building
URL's for its methods
|
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,
String viewsList)
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,
String viewsList)
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,
boolean usesDefaultModule)
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,
boolean usesDefaultModule)
setup in interface ControllerOperationsmodule - Pom module where Spring MVC should be includedusesDefaultModule - boolean that indicates if the setup command is using the
default application modulepublic 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 Map<String,ControllerMVCResponseService> getInstalledControllerMVCResponseTypes()
public void createOrUpdateDetailControllersForAllEntities(ControllerMVCResponseService responseType, org.springframework.roo.model.JavaPackage controllerPackage, String viewsList)
ControllerOperationscreateOrUpdateDetailControllersForAllEntities in interface ControllerOperationsresponseType - View provider to usecontrollerPackage - Package where is situated the controllerviewsList - Separated comma list of all parent views where the new detail
will be displayedpublic void createOrUpdateDetailControllerForEntity(org.springframework.roo.model.JavaType entity,
String relationField,
ControllerMVCResponseService responseType,
org.springframework.roo.model.JavaPackage controllerPackage,
String viewsList)
ControllerOperationscreateOrUpdateDetailControllerForEntity in interface ControllerOperationsentity - Entity over which create the controllerrelationField - Field that set the relationshipresponseType - View provider to usecontrollerPackage - Package where is situated the controllerviewsList - Separated comma list of all parent views where the new detail
will be displayedpublic void createLinkFactoryClass(org.springframework.roo.model.JavaType controller)
createLinkFactoryClass in interface ControllerOperationscontroller - the JavaType of the associated 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 RooControllerpublic String getName()
getName in interface org.springframework.roo.project.Featurepublic boolean isInstalledInModule(String moduleName)
isInstalledInModule in interface org.springframework.roo.project.FeatureCopyright © 2009–2017. All rights reserved.