import org.splat.dal.bo.som.Visibility;
import org.splat.kernel.InvalidPropertyException;
import org.splat.service.SearchService;
-import org.splat.service.SimulationContextService;
-import org.splat.service.UserService;
import org.splat.service.technical.ProjectSettingsService;
+import org.splat.wapp.Constants;
/**
* Search studies form action.
*/
public class SearchStudyAction extends AbstractSearchBaseAction {
+ /**
+ * Serial version ID.
+ */
+ private static final long serialVersionUID = -1910481357051393077L;
+
/**
* "Private", "Public", "All".
*/
* Injected search service.
*/
private SearchService _searchService;
- /**
- * Injected simulation context service.
- */
- private SimulationContextService _simulationContextService;
- /**
- * Injected user service.
- */
- private UserService _userService;
-
- /**
- * Value of the menu property.
- * It can be: none, create, open, study, knowledge, sysadmin, help.
- */
- private String _menuProperty;
-
- /**
- * Value of the tool bar property.
- * It can be: none, standard, study, back.
- */
- private String _toolProperty;
-
- /**
- * Value of the left menu property.
- * It can be: open, study, knowledge, scenario.
- */
- private String _leftMenuProperty;
-
- /**
- * Serial version ID.
- */
- private static final long serialVersionUID = -1910481357051393077L;
enum UserAction {
refreshResult, selectContextType, selectContextValue, cancelSelect, removeContext
/**
* Initialize study search form.
+ *
* @return SUCCESS if no exception, otherwise return ERROR
*/
public String doInitialize() {
// Final initialization of the form
setCandidates();
setContextTypeOptions(getInvolvedContexts());
-
- setMenuProperty("open");
- setToolProperty("none");
- setLeftMenuProperty("open");
- initializationFullScreenContext(_menuProperty, _toolProperty, _leftMenuProperty);
+ initializationFullScreenContext(Constants.OPEN, Constants.NONE,
+ Constants.OPEN);
+
} catch (Exception error) {
// No need to roll back the transaction as it is read only
LOG.error("Reason: ", error);
-
- setMenuProperty("none");
- initializationScreenContext(_menuProperty);
-
+
+ initializationScreenContext(Constants.NONE);
+
res = ERROR;
}
return res;
}
- /**
+ /**
* {@inheritDoc}
+ *
* @see org.splat.simer.AbstractSearchBaseAction#doSearch()
*/
@Override
* @param projectSettingsService
* project settings service
*/
- public void setProjectSettings(final ProjectSettingsService projectSettingsService) {
+ public void setProjectSettings(
+ final ProjectSettingsService projectSettingsService) {
_projectSettings = projectSettingsService;
}
-
- /**
- * Get the simulationContextService.
- *
- * @return the simulationContextService
- */
- @Override
- public SimulationContextService getSimulationContextService() {
- return _simulationContextService;
- }
-
- /**
- * Set the simulationContextService.
- *
- * @param simulationContextService
- * the simulationContextService to set
- */
- @Override
- public void setSimulationContextService(
- final SimulationContextService simulationContextService) {
- _simulationContextService = simulationContextService;
- }
-
- /**
- * Get the userService.
- *
- * @return the userService
- */
- @Override
- public UserService getUserService() {
- return _userService;
- }
-
- /**
- * Set the userService.
- *
- * @param userService
- * the userService to set
- */
- @Override
- public void setUserService(final UserService userService) {
- _userService = userService;
- }
-
- /**
- * Get the menuProperty.
- * @return the menuProperty
- */
- public String getMenuProperty() {
- return _menuProperty;
- }
-
- /**
- * Set the menuProperty.
- * @param menuProperty the menuProperty to set
- */
- public void setMenuProperty(final String menuProperty) {
- this._menuProperty = menuProperty;
- }
-
- /**
- * Get the toolProperty.
- * @return the toolProperty
- */
- public String getToolProperty() {
- return _toolProperty;
- }
-
- /**
- * Set the toolProperty.
- * @param toolProperty the toolProperty to set
- */
- public void setToolProperty(final String toolProperty) {
- _toolProperty = toolProperty;
- }
-
- /**
- * Get the leftMenuProperty.
- * @return the leftMenuProperty
- */
- public String getLeftMenuProperty() {
- return _leftMenuProperty;
- }
-
- /**
- * Set the leftMenuProperty.
- * @param leftMenuProperty the leftMenuProperty to set
- */
- public void setLeftMenuProperty(final String leftMenuProperty) {
- _leftMenuProperty = leftMenuProperty;
- }
}
\ No newline at end of file