Skip to content

Commit

Permalink
SerialDateWidget: Refactorings - multiple classes renamed.
Browse files Browse the repository at this point in the history
  • Loading branch information
dSeidel committed Aug 7, 2017
1 parent 12536b7 commit c0fc8a1
Show file tree
Hide file tree
Showing 32 changed files with 113 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

package org.opencms.acacia.client.widgets;

import org.opencms.acacia.client.widgets.serialdate.CmsSerialDate;
import org.opencms.acacia.client.widgets.serialdate.CmsSerialDateController;
import org.opencms.acacia.client.widgets.serialdate.I_CmsLayoutBundle;

import com.google.gwt.dom.client.Element;
Expand All @@ -47,14 +47,14 @@ public class CmsSerialDateWidget extends Composite implements I_CmsEditWidget {
private boolean m_active = true;

/** The global select box. */
private CmsSerialDate m_serialDate;
private CmsSerialDateController m_serialDate;

/**
* Constructs an CmsComboWidget with the in XSD schema declared configuration.<p>
*/
public CmsSerialDateWidget() {

m_serialDate = new CmsSerialDate();
m_serialDate = new CmsSerialDateController();
// All composites must call initWidget() in their constructors.
initWidget(m_serialDate);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public abstract class A_CmsPatternPanelController implements I_CmsSerialDatePatt
/** The change handler called on {@link #onValueChange()}. */
private final I_ChangeHandler m_changeHandler;
/** The model to read data from. */
protected final CmsSerialDateValueWrapper m_model;
protected final CmsSerialDateValue m_model;

/**
* Constructor for the abstract pattern panel controller
* @param model the model to read data from.
* @param changeHandler the handler for value changes.
*/
public A_CmsPatternPanelController(final CmsSerialDateValueWrapper model, final I_ChangeHandler changeHandler) {
public A_CmsPatternPanelController(final CmsSerialDateValue model, final I_ChangeHandler changeHandler) {
m_model = model;
m_changeHandler = changeHandler;

Expand All @@ -53,7 +53,7 @@ public A_CmsPatternPanelController(final CmsSerialDateValueWrapper model, final
/**
* @see org.opencms.acacia.client.widgets.serialdate.I_CmsSerialDatePatternController#getView()
*/
abstract public I_CmsPatternView getView();
abstract public I_CmsSerialDatePatternView getView();

/**
* @param cmd see change handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@
public class CmsPatternPanelDailyController extends A_CmsPatternPanelController {

/** The controlled view. */
private final CmsPatternPanelDaily m_view;
private final CmsPatternPanelDailyView m_view;

/**
* Constructor for the daily pattern panel controller
* @param model the model to read data from.
* @param changeHandler the value change handler.
*/
CmsPatternPanelDailyController(final CmsSerialDateValueWrapper model, final I_ChangeHandler changeHandler) {
CmsPatternPanelDailyController(final CmsSerialDateValue model, final I_ChangeHandler changeHandler) {
super(model, changeHandler);
m_view = new CmsPatternPanelDaily(this, m_model);
m_view = new CmsPatternPanelDailyView(this, m_model);
}

/**
* @see org.opencms.acacia.client.widgets.serialdate.I_CmsSerialDatePatternController#getView()
*/
@Override
public CmsPatternPanelDaily getView() {
public CmsPatternPanelDailyView getView() {

return m_view;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
/**
* The daily pattern panel.<p>
* */
public class CmsPatternPanelDaily extends Composite implements I_CmsPatternView {
public class CmsPatternPanelDailyView extends Composite implements I_CmsSerialDatePatternView {

/** The UI binder interface. */
interface I_CmsPatternPanelDailyUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelDaily> {
interface I_CmsPatternPanelDailyUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelDailyView> {
// nothing to do
}

Expand Down Expand Up @@ -99,7 +99,7 @@ interface I_CmsPatternPanelDailyUiBinder extends UiBinder<HTMLPanel, CmsPatternP
* @param controller the controller that handles value changes.
* @param model the model that provides the values.
*/
public CmsPatternPanelDaily(CmsPatternPanelDailyController controller, I_CmsObservableSerialDateValue model) {
public CmsPatternPanelDailyView(CmsPatternPanelDailyController controller, I_CmsObservableSerialDateValue model) {
m_controller = controller;
m_model = model;
m_model.registerValueChangeObserver(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
public class CmsPatternPanelIndividualController extends A_CmsPatternPanelController {

/** The controlled view. */
private final CmsPatternPanelIndividual m_view;
private final CmsPatternPanelIndividualView m_view;

/**
* Constructor for the individual pattern panel controller
* @param model the model to read data from.
* @param changeHandler the value change handler.
*/
CmsPatternPanelIndividualController(final CmsSerialDateValueWrapper model, final I_ChangeHandler changeHandler) {
CmsPatternPanelIndividualController(final CmsSerialDateValue model, final I_ChangeHandler changeHandler) {
super(model, changeHandler);
m_view = new CmsPatternPanelIndividual(this, m_model);
m_view = new CmsPatternPanelIndividualView(this, m_model);
}

/**
* @see org.opencms.acacia.client.widgets.serialdate.A_CmsPatternPanelController#getView()
*/
@Override
public I_CmsPatternView getView() {
public I_CmsSerialDatePatternView getView() {

return m_view;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
/**
* The daily pattern panel.<p>
* */
public class CmsPatternPanelIndividual extends Composite implements I_CmsPatternView {
public class CmsPatternPanelIndividualView extends Composite implements I_CmsSerialDatePatternView {

/** The UI binder interface. */
interface I_CmsPatternPanelIndividualUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelIndividual> {
interface I_CmsPatternPanelIndividualUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelIndividualView> {
// nothing to do
}

Expand Down Expand Up @@ -89,7 +89,7 @@ interface I_CmsPatternPanelIndividualUiBinder extends UiBinder<HTMLPanel, CmsPat
* @param controller the controller that handles value changes.
* @param model the model that provides the values.
*/
public CmsPatternPanelIndividual(
public CmsPatternPanelIndividualView(
CmsPatternPanelIndividualController controller,
I_CmsObservableSerialDateValue model) {
m_controller = controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@
public class CmsPatternPanelMonthlyController extends A_CmsPatternPanelController {

/** The controlled view. */
private final CmsPatternPanelMonthly m_view;
private final CmsPatternPanelMonthlyView m_view;

/**
* Constructor for the monthly pattern panel controller
* @param model the model to read data from.
* @param changeHandler the change handler.
*/
CmsPatternPanelMonthlyController(final CmsSerialDateValueWrapper model, final I_ChangeHandler changeHandler) {
CmsPatternPanelMonthlyController(final CmsSerialDateValue model, final I_ChangeHandler changeHandler) {
super(model, changeHandler);
m_view = new CmsPatternPanelMonthly(this, m_model);
m_view = new CmsPatternPanelMonthlyView(this, m_model);
}

/**
* @see org.opencms.acacia.client.widgets.serialdate.A_CmsPatternPanelController#getView()
*/
@Override
public I_CmsPatternView getView() {
public I_CmsSerialDatePatternView getView() {

return m_view;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
/**
* The monthly pattern panel.<p>
* */
public class CmsPatternPanelMonthly extends Composite implements I_CmsPatternView {
public class CmsPatternPanelMonthlyView extends Composite implements I_CmsSerialDatePatternView {

/** The UI binder interface. */
interface I_CmsPatternPanelMonthlyUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelMonthly> {
interface I_CmsPatternPanelMonthlyUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelMonthlyView> {
// nothing to do
}

Expand Down Expand Up @@ -138,7 +138,7 @@ interface I_CmsPatternPanelMonthlyUiBinder extends UiBinder<HTMLPanel, CmsPatter
* @param controller the controller that handles value changes.
* @param model the model that provides the values.
*/
public CmsPatternPanelMonthly(CmsPatternPanelMonthlyController controller, I_CmsObservableSerialDateValue model) {
public CmsPatternPanelMonthlyView(CmsPatternPanelMonthlyController controller, I_CmsObservableSerialDateValue model) {
m_controller = controller;
m_model = model;
m_model.registerValueChangeObserver(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class CmsPatternPanelNoneController implements I_CmsSerialDatePatternController {

/** Dummy pattern view. */
private static final I_CmsPatternView DUMMY_VIEW = new I_CmsPatternView() {
private static final I_CmsSerialDatePatternView DUMMY_VIEW = new I_CmsSerialDatePatternView() {

public Widget asWidget() {

Expand All @@ -48,7 +48,7 @@ public void onValueChange() {
/**
* @see org.opencms.acacia.client.widgets.serialdate.I_CmsSerialDatePatternController#getView()
*/
public I_CmsPatternView getView() {
public I_CmsSerialDatePatternView getView() {

return DUMMY_VIEW;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@
public class CmsPatternPanelWeeklyController extends A_CmsPatternPanelController {

/** The controlled view. */
private final CmsPatternPanelWeekly m_view;
private final CmsPatternPanelWeeklyView m_view;

/**
* Constructor for the weekly pattern panel controller
* @param model the model to read data from.
* @param changeHandler the value change handler.
*/
CmsPatternPanelWeeklyController(final CmsSerialDateValueWrapper model, final I_ChangeHandler changeHandler) {
CmsPatternPanelWeeklyController(final CmsSerialDateValue model, final I_ChangeHandler changeHandler) {
super(model, changeHandler);
m_view = new CmsPatternPanelWeekly(this, m_model);
m_view = new CmsPatternPanelWeeklyView(this, m_model);
}

/**
* @see org.opencms.acacia.client.widgets.serialdate.A_CmsPatternPanelController#getView()
*/
@Override
public I_CmsPatternView getView() {
public I_CmsSerialDatePatternView getView() {

return m_view;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
/**
* The weekly pattern panel.<p>
* */
public class CmsPatternPanelWeekly extends Composite implements I_CmsPatternView {
public class CmsPatternPanelWeeklyView extends Composite implements I_CmsSerialDatePatternView {

/** The UI binder interface. */
interface I_CmsPatternPanelWeekly extends UiBinder<HTMLPanel, CmsPatternPanelWeekly> {
interface I_CmsPatternPanelWeekly extends UiBinder<HTMLPanel, CmsPatternPanelWeeklyView> {
// nothing to do
}

Expand Down Expand Up @@ -96,7 +96,7 @@ interface I_CmsPatternPanelWeekly extends UiBinder<HTMLPanel, CmsPatternPanelWee
* @param model the model to read data from.
* @param controller the controller to communicate with.
*/
public CmsPatternPanelWeekly(CmsPatternPanelWeeklyController controller, I_CmsObservableSerialDateValue model) {
public CmsPatternPanelWeeklyView(CmsPatternPanelWeeklyController controller, I_CmsObservableSerialDateValue model) {

m_controller = controller;
m_model = model;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@
public class CmsPatternPanelYearlyController extends A_CmsPatternPanelController {

/** The controlled view. */
private final CmsPatternPanelYearly m_view;
private final CmsPatternPanelYearlyView m_view;

/**
* Constructor for the yearly pattern panel controller
* @param model the model to read data from.
* @param changeHandler the value change handler.
*/
CmsPatternPanelYearlyController(CmsSerialDateValueWrapper model, I_ChangeHandler changeHandler) {
CmsPatternPanelYearlyController(CmsSerialDateValue model, I_ChangeHandler changeHandler) {
super(model, changeHandler);
m_view = new CmsPatternPanelYearly(this, m_model);
m_view = new CmsPatternPanelYearlyView(this, m_model);
}

/**
* @see org.opencms.acacia.client.widgets.serialdate.A_CmsPatternPanelController#getView()
*/
@Override
public I_CmsPatternView getView() {
public I_CmsSerialDatePatternView getView() {

return m_view;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
/**
* The yearly pattern panel.<p>
* */
public class CmsPatternPanelYearly extends Composite implements I_CmsPatternView {
public class CmsPatternPanelYearlyView extends Composite implements I_CmsSerialDatePatternView {

/** The UI binder interface. */
interface I_CmsPatternPanelYearlyUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelYearly> {
interface I_CmsPatternPanelYearlyUiBinder extends UiBinder<HTMLPanel, CmsPatternPanelYearlyView> {
// nothing to do
}

Expand Down Expand Up @@ -116,7 +116,7 @@ interface I_CmsPatternPanelYearlyUiBinder extends UiBinder<HTMLPanel, CmsPattern
* @param controller the controller that handles value changes.
* @param model the model that provides the values.
*/
public CmsPatternPanelYearly(CmsPatternPanelYearlyController controller, I_CmsObservableSerialDateValue model) {
public CmsPatternPanelYearlyView(CmsPatternPanelYearlyController controller, I_CmsObservableSerialDateValue model) {
m_controller = controller;
m_model = model;
m_model.registerValueChangeObserver(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import com.google.gwt.user.client.ui.Composite;

/** Controller for the serial date widget, being the widget implementation itself. */
public class CmsSerialDate extends Composite implements I_CmsEditWidget, I_ChangeHandler, I_StatusUpdateHandler {
public class CmsSerialDateController extends Composite implements I_CmsEditWidget, I_ChangeHandler, I_StatusUpdateHandler {

/**
* The status update timer.<p>
Expand Down Expand Up @@ -121,13 +121,13 @@ private class CmsExceptionsDeleteConfirmDialog {
Command m_cmd;

/** The value to reset the exceptions */
final CmsSerialDateValueWrapper m_value;
final CmsSerialDateValue m_value;

/**
* Default constructor.
* @param value the value where the exceptions should be reset.
*/
CmsExceptionsDeleteConfirmDialog(final CmsSerialDateValueWrapper value) {
CmsExceptionsDeleteConfirmDialog(final CmsSerialDateValue value) {
m_value = value;
m_dialog = new CmsConfirmDialog(
Messages.get().key(Messages.GUI_SERIALDATE_CONFIRM_EXCEPTION_DIALOG_CAPTION_0),
Expand Down Expand Up @@ -208,17 +208,17 @@ void handleOk() {
final CmsSerialDateView m_view;

/** The model */
final CmsSerialDateValueWrapper m_model;
final CmsSerialDateValue m_model;

/** The confirmation dialog for deletion of exceptions. */
private CmsExceptionsDeleteConfirmDialog m_exceptionConfirmDialog;

/**
* Category field widgets for ADE forms.<p>
*/
public CmsSerialDate() {
public CmsSerialDateController() {

m_model = new CmsSerialDateValueWrapper();
m_model = new CmsSerialDateValue();
m_view = new CmsSerialDateView(this, m_model);
initWidget(m_view);
initPatternControllers();
Expand All @@ -234,7 +234,7 @@ public void execute() {
@Override
protected void onResponse(Collection<CmsPair<Date, Boolean>> result) {

CmsSerialDate.this.m_view.showCurrentDates(result);
CmsSerialDateController.this.m_view.showCurrentDates(result);
}
};
m_statusUpdateAction = new CmsRpcAction<CmsPair<Boolean, String>>() {
Expand Down Expand Up @@ -310,7 +310,7 @@ public I_CmsSerialDatePatternController getPattern() {
* Returns the widget to place in the pattern panel.
* @return the widget to place in the pattern panel.
*/
public I_CmsPatternView getPatternView() {
public I_CmsSerialDatePatternView getPatternView() {

return getPattern().getView();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
* Client-side implementation of {@link I_CmsSerialDateValue}.
* The implementation additionally has setters for the various values of the serial date specification.
*/
public class CmsSerialDateValueWrapper extends A_CmsSerialDateValue implements I_CmsObservableSerialDateValue {
public class CmsSerialDateValue extends A_CmsSerialDateValue implements I_CmsObservableSerialDateValue {

/** The list of value change observers. */
Collection<I_CmsSerialDateValueChangeObserver> m_valueChangeObservers = new HashSet<>();

/** Default constructor, setting the default state of the the serial date widget. */
public CmsSerialDateValueWrapper() {
public CmsSerialDateValue() {
setDefaultValue();
}

Expand Down
Loading

0 comments on commit c0fc8a1

Please sign in to comment.