CCM NG: Some fixes for minor things
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5171 8810af33-2d31-482b-a856-94f89814c4df
parent
45eef357c4
commit
fd3730bb9d
|
|
@ -82,7 +82,11 @@ class ItemPhaseTableModel implements TableModel {
|
||||||
case 1:
|
case 1:
|
||||||
return currentRow.getDescription();
|
return currentRow.getDescription();
|
||||||
case 2:
|
case 2:
|
||||||
return format.format(currentRow.getStartDate());
|
if (currentRow.getStartDate() == null) {
|
||||||
|
return "";
|
||||||
|
} else {
|
||||||
|
return format.format(currentRow.getStartDate());
|
||||||
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if (currentRow.getEndDate() == null) {
|
if (currentRow.getEndDate() == null) {
|
||||||
return new GlobalizedMessage("cms.ui.lifecycle.forever",
|
return new GlobalizedMessage("cms.ui.lifecycle.forever",
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import java.util.Date;
|
||||||
class ItemPhaseTableRow implements Serializable {
|
class ItemPhaseTableRow implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -8947185134493863779L;
|
private static final long serialVersionUID = -8947185134493863779L;
|
||||||
|
|
||||||
private long phaseId;
|
private long phaseId;
|
||||||
private String name;
|
private String name;
|
||||||
private String description;
|
private String description;
|
||||||
|
|
@ -60,21 +60,35 @@ class ItemPhaseTableRow implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStartDate() {
|
public Date getStartDate() {
|
||||||
return new Date(startDate.getTime());
|
if (startDate == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return new Date(startDate.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStartDate(final Date startDate) {
|
public void setStartDate(final Date startDate) {
|
||||||
this.startDate = new Date(startDate.getTime());
|
if (startDate == null) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
} else {
|
||||||
|
this.startDate = new Date(startDate.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEndDate() {
|
public Date getEndDate() {
|
||||||
return new Date(endDate.getTime());
|
if (endDate == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return new Date(endDate.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEndDate(final Date endDate) {
|
public void setEndDate(final Date endDate) {
|
||||||
this.endDate = new Date(endDate.getTime());
|
if (endDate == null) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
} else {
|
||||||
|
this.endDate = new Date(endDate.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,19 +85,35 @@ public class Phase implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStartDateTime() {
|
public Date getStartDateTime() {
|
||||||
return new Date(startDateTime.getTime());
|
if (startDateTime == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return new Date(startDateTime.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStartDateTime(final Date startDateTime) {
|
public void setStartDateTime(final Date startDateTime) {
|
||||||
this.startDateTime = new Date(startDateTime.getTime());
|
if (startDateTime == null) {
|
||||||
|
this.startDateTime = startDateTime;
|
||||||
|
} else {
|
||||||
|
this.startDateTime = new Date(startDateTime.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEndDateTime() {
|
public Date getEndDateTime() {
|
||||||
return new Date(endDateTime.getTime());
|
if (endDateTime == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return new Date(endDateTime.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEndDateTime(final Date endDateTime) {
|
public void setEndDateTime(final Date endDateTime) {
|
||||||
this.endDateTime = new Date(endDateTime.getTime());
|
if (endDateTime == null) {
|
||||||
|
this.endDateTime = endDateTime;
|
||||||
|
} else {
|
||||||
|
this.endDateTime = new Date(endDateTime.getTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getListener() {
|
public String getListener() {
|
||||||
|
|
@ -202,7 +218,7 @@ public class Phase implements Serializable {
|
||||||
public final String toString() {
|
public final String toString() {
|
||||||
return toString("");
|
return toString("");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
return String.format("%s{ "
|
return String.format("%s{ "
|
||||||
+ "phaseId = %d, "
|
+ "phaseId = %d, "
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,4 @@ alter table CCM_CMS.CONTENT_TYPES
|
||||||
alter table CCM_CMS.CONTENT_TYPES
|
alter table CCM_CMS.CONTENT_TYPES
|
||||||
add constraint FKhnu9oikw8rpf22lt5fmk41t7k
|
add constraint FKhnu9oikw8rpf22lt5fmk41t7k
|
||||||
foreign key (DEFAULT_WORKFLOW)
|
foreign key (DEFAULT_WORKFLOW)
|
||||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
references CCM_CORE.WORKFLOWS;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ alter table CCM_CMS.CONTENT_SECTION_LIFECYCLE_DEFINITIONS
|
||||||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||||
add constraint FKrx08cdjm9tutrp5lvfhgslw48
|
add constraint FKrx08cdjm9tutrp5lvfhgslw48
|
||||||
foreign key (WORKFLOW_TEMPLATE_ID)
|
foreign key (WORKFLOW_TEMPLATE_ID)
|
||||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
references CCM_CORE.WORKFLOWS;
|
||||||
|
|
||||||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||||
add constraint FK6kuejkcl9hcbkr8q6bdlatt8q
|
add constraint FK6kuejkcl9hcbkr8q6bdlatt8q
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,5 @@ alter table CCM_CMS.CONTENT_TYPES
|
||||||
alter table CCM_CMS.CONTENT_TYPES
|
alter table CCM_CMS.CONTENT_TYPES
|
||||||
add constraint FKhnu9oikw8rpf22lt5fmk41t7k
|
add constraint FKhnu9oikw8rpf22lt5fmk41t7k
|
||||||
foreign key (DEFAULT_WORKFLOW)
|
foreign key (DEFAULT_WORKFLOW)
|
||||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
references CCM_CORE.WORKFLOWS;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ alter table CCM_CMS.CONTENT_SECTION_LIFECYCLE_DEFINITIONS
|
||||||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||||
add constraint FKrx08cdjm9tutrp5lvfhgslw48
|
add constraint FKrx08cdjm9tutrp5lvfhgslw48
|
||||||
foreign key (WORKFLOW_TEMPLATE_ID)
|
foreign key (WORKFLOW_TEMPLATE_ID)
|
||||||
references CCM_CORE.WORKFLOW_TEMPLATES;
|
references CCM_CORE.WORKFLOWS;
|
||||||
|
|
||||||
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
alter table CCM_CMS.CONTENT_SECTION_WORKFLOW_TEMPLATES
|
||||||
add constraint FK6kuejkcl9hcbkr8q6bdlatt8q
|
add constraint FK6kuejkcl9hcbkr8q6bdlatt8q
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue