Skip to content
Snippets Groups Projects
Commit bf7914a2 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Some minor modifications for quality reasons

parent c0cab172
No related branches found
No related tags found
No related merge requests found
......@@ -82,12 +82,27 @@ public class CurrentCockpitBean {
}
}
/**
* The getter for the {@link #projectsBean}-property.
*
* @return {@link #projectsBean}
*/
public ProjectsBean getProjectsBean() {
return this.projectsBean;
synchronized (this) {
return this.projectsBean;
}
}
/**
* The setter for the {@link #projectsBean}-property.
*
* @param projectsBean
* The new value for {@link #projectsBean}.
*/
public void setProjectsBean(final ProjectsBean projectsBean) {
this.projectsBean = projectsBean;
synchronized (this) {
this.projectsBean = projectsBean;
}
}
/**
......@@ -110,7 +125,7 @@ public class CurrentCockpitBean {
public void initalize() {
synchronized (this) {
// Make sure that the initialization will only be done for the init request.
if (!FacesContext.getCurrentInstance().isPostback()) {
if (!FacesContext.getCurrentInstance().isPostback() && (this.projectsBean != null)) {
// Remember the given parameters
this.project = this.projectsBean.openProject(this.projectName);
}
......
......@@ -76,10 +76,21 @@ public class CurrentControllerBean {
// No code necessary
}
/**
* The getter for the {@link #projectsBean}-property.
*
* @return {@link #projectsBean}
*/
public ProjectsBean getProjectsBean() {
return this.projectsBean;
}
/**
* The setter for the {@link #projectsBean}-property.
*
* @param projectsBean
* The new value for {@link #projectsBean}.
*/
public void setProjectsBean(final ProjectsBean projectsBean) {
this.projectsBean = projectsBean;
}
......
......@@ -56,22 +56,37 @@ public class MIPluginStringConverter implements Converter {
/* No code necessary. */
}
/**
* The getter for the {@link #bean}-property.
*
* @return {@link #bean}
*/
public CurrentAnalysisEditorBean getBean() {
return this.bean;
}
/**
* The setter for the {@link #bean}-property.
*
* @param bean
* The new value for {@link #bean}.
*/
public void setBean(final CurrentAnalysisEditorBean bean) {
this.bean = bean;
}
@Override
public Object getAsObject(final FacesContext fc, final UIComponent uic, final String string) {
return this.bean.getPluginByID(string);
if (this.bean != null) {
return this.bean.getPluginByID(string);
} else {
return null;
}
}
@Override
public String getAsString(final FacesContext fc, final UIComponent uic, final Object o) {
if (o == null) {
if ((this.bean == null) || (o == null)) {
return "";
} else {
return Integer.toString(this.bean.getPluginID((MIPlugin) o));
......
......@@ -56,22 +56,37 @@ public class MIPortStringConverter implements Converter {
/* No code necessary. */
}
/**
* The getter for the {@link #bean}-property.
*
* @return {@link #bean}
*/
public CurrentAnalysisEditorBean getBean() {
return this.bean;
}
/**
* The setter for the {@link #bean}-property.
*
* @param bean
* The new value for {@link #bean}.
*/
public void setBean(final CurrentAnalysisEditorBean bean) {
this.bean = bean;
}
@Override
public Object getAsObject(final FacesContext fc, final UIComponent uic, final String string) {
return this.bean.getPortByID(string);
if (this.bean != null) {
return this.bean.getPortByID(string);
} else {
return null;
}
}
@Override
public String getAsString(final FacesContext fc, final UIComponent uic, final Object o) {
if (o == null) {
if ((o == null) || (this.bean == null)) {
return "";
} else {
return Integer.toString(this.bean.getPortID((MIPort) o));
......
......@@ -56,22 +56,37 @@ public class MIRepositoryStringConverter implements Converter {
/* No code necessary. */
}
/**
* The getter for the {@link #bean}-property.
*
* @return {@link #bean}
*/
public CurrentAnalysisEditorBean getBean() {
return this.bean;
}
/**
* The setter for the {@link #bean}-property.
*
* @param bean
* The new value for {@link #bean}.
*/
public void setBean(final CurrentAnalysisEditorBean bean) {
this.bean = bean;
}
@Override
public Object getAsObject(final FacesContext fc, final UIComponent uic, final String string) {
return this.bean.getRepositoryByID(string);
if (this.bean != null) {
return this.bean.getRepositoryByID(string);
} else {
return null;
}
}
@Override
public String getAsString(final FacesContext fc, final UIComponent uic, final Object o) {
if (o == null) {
if ((o == null) || (this.bean == null)) {
return "";
} else {
return Integer.toString(this.bean.getRepositoryID((MIRepository) o));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment