use of org.jaffa.datatypes.exceptions.MandatoryFieldException in project jaffa-framework by jaffa-projects.
the class FormUsageViewerComponent method display.
// .//GEN-END:_FormUsageViewerOutDto_1_be
// .//GEN-BEGIN:_display_1_be
/**
* This retrieves the details for the FormUsage.
* @throws ApplicationExceptions This will be thrown in case any invalid data has been set, or if no data has been set.
* @throws FrameworkException Indicates some system error.
* @return The FormKey for the View screen.
*/
public FormKey display() throws ApplicationExceptions, FrameworkException {
ApplicationExceptions appExps = null;
// .//GEN-BEGIN:_display_2_be
if (getFormName() == null) {
if (appExps == null)
appExps = new ApplicationExceptions();
appExps.add(new MandatoryFieldException(FormUsageMeta.META_FORM_NAME.getLabelToken()));
}
if (appExps != null && appExps.size() > 0)
throw appExps;
doInquiry();
return getViewerFormKey();
}
use of org.jaffa.datatypes.exceptions.MandatoryFieldException in project jaffa-framework by jaffa-projects.
the class PrinterDefinitionViewerComponent method display.
// .//GEN-END:_PrinterDefinitionViewerOutDto_1_be
// .//GEN-BEGIN:_display_1_be
/**
* This retrieves the details for the PrinterDefinition.
* @throws ApplicationExceptions This will be thrown in case any invalid data has been set, or if no data has been set.
* @throws FrameworkException Indicates some system error.
* @return The FormKey for the View screen.
*/
public FormKey display() throws ApplicationExceptions, FrameworkException {
ApplicationExceptions appExps = null;
// .//GEN-BEGIN:_display_2_be
if (getPrinterId() == null) {
if (appExps == null)
appExps = new ApplicationExceptions();
appExps.add(new MandatoryFieldException(PrinterDefinitionMeta.META_PRINTER_ID.getLabelToken()));
}
if (appExps != null && appExps.size() > 0)
throw appExps;
doInquiry();
return getViewerFormKey();
}
use of org.jaffa.datatypes.exceptions.MandatoryFieldException in project jaffa-framework by jaffa-projects.
the class PrinterOutputTypeViewerComponent method display.
// .//GEN-END:_PrinterOutputTypeViewerOutDto_1_be
// .//GEN-BEGIN:_display_1_be
/**
* This retrieves the details for the PrinterOutputType.
* @throws ApplicationExceptions This will be thrown in case any invalid data has been set, or if no data has been set.
* @throws FrameworkException Indicates some system error.
* @return The FormKey for the View screen.
*/
public FormKey display() throws ApplicationExceptions, FrameworkException {
ApplicationExceptions appExps = null;
// .//GEN-BEGIN:_display_2_be
if (getOutputType() == null) {
if (appExps == null)
appExps = new ApplicationExceptions();
appExps.add(new MandatoryFieldException(PrinterOutputTypeMeta.META_OUTPUT_TYPE.getLabelToken()));
}
if (appExps != null && appExps.size() > 0)
throw appExps;
doInquiry();
return getViewerFormKey();
}
use of org.jaffa.datatypes.exceptions.MandatoryFieldException in project jaffa-framework by jaffa-projects.
the class FormDefinitionMaintenanceForm method doValidate0.
// .//GEN-END:_doValidate_2_be
// .//GEN-BEGIN:_doValidateMain_1_be
/**
* This method should be invoked to ensure a valid state of the FormBean. It will validate the data in the models and set the corresponding properties.
* Errors will be raised in the FormBean, if any validation fails.
* @param request The request stream
* @return A true indicates validations went through successfully.
*/
public boolean doValidate0(HttpServletRequest request) {
boolean valid = true;
try {
String htmlString = getFormIdWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.Long value = (java.lang.Long) FieldValidator.validateData(htmlString, (IntegerFieldMetaData) FormDefinitionMeta.META_FORM_ID, true);
setFormId(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((IntegerFieldMetaData) FormDefinitionMeta.META_FORM_ID).getLabelToken(), e);
}
try {
String htmlString = getFormNameWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_FORM_NAME, true);
setFormName(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_FORM_NAME).getLabelToken(), e);
}
try {
String htmlString = getFormAlternateWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_FORM_ALTERNATE, true);
setFormAlternate(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_FORM_ALTERNATE).getLabelToken(), e);
}
try {
String htmlString = getFormVariationWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_FORM_VARIATION, true);
setFormVariation(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_FORM_VARIATION).getLabelToken(), e);
}
try {
String htmlString = getOutputTypeWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_OUTPUT_TYPE, true);
if (value == null)
throw new MandatoryFieldException(((StringFieldMetaData) FormDefinitionMeta.META_OUTPUT_TYPE).getLabelToken());
setOutputType(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_OUTPUT_TYPE).getLabelToken(), e);
}
try {
String htmlString = getDescriptionWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DESCRIPTION, true);
setDescription(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DESCRIPTION).getLabelToken(), e);
}
try {
String htmlString = getRemarksWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_REMARKS, true);
setRemarks(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_REMARKS).getLabelToken(), e);
}
try {
String htmlString = getFollowOnFormNameWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_FOLLOW_ON_FORM_NAME, true);
setFollowOnFormName(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_FOLLOW_ON_FORM_NAME).getLabelToken(), e);
}
try {
String htmlString = getFormTemplateWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_FORM_TEMPLATE, true);
setFormTemplate(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_FORM_TEMPLATE).getLabelToken(), e);
}
try {
String htmlString = getFieldLayoutWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_FIELD_LAYOUT, true);
setFieldLayout(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_FIELD_LAYOUT).getLabelToken(), e);
}
try {
String htmlString = getDomClassWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_CLASS, true);
if (value == null)
throw new MandatoryFieldException(((StringFieldMetaData) FormDefinitionMeta.META_DOM_CLASS).getLabelToken());
setDomClass(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_CLASS).getLabelToken(), e);
}
try {
String htmlString = getDomKey1WM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY1, true);
if (value == null)
throw new MandatoryFieldException(((StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY1).getLabelToken());
setDomKey1(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY1).getLabelToken(), e);
}
try {
String htmlString = getDomKey2WM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY2, true);
setDomKey2(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY2).getLabelToken(), e);
}
try {
String htmlString = getDomKey3WM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY3, true);
setDomKey3(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY3).getLabelToken(), e);
}
try {
String htmlString = getDomKey4WM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY4, true);
setDomKey4(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY4).getLabelToken(), e);
}
try {
String htmlString = getDomKey5WM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY5, true);
setDomKey5(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY5).getLabelToken(), e);
}
try {
String htmlString = getDomKey6WM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY6, true);
setDomKey6(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_KEY6).getLabelToken(), e);
}
try {
String htmlString = getDomFactoryWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_DOM_FACTORY, true);
if (value == null)
throw new MandatoryFieldException(((StringFieldMetaData) FormDefinitionMeta.META_DOM_FACTORY).getLabelToken());
setDomFactory(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_DOM_FACTORY).getLabelToken(), e);
}
try {
String htmlString = getAdditionalDataComponentWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_ADDITIONAL_DATA_COMPONENT, true);
setAdditionalDataComponent(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_ADDITIONAL_DATA_COMPONENT).getLabelToken(), e);
}
try {
String htmlString = getFollowOnFormAlternateWM().getValue();
if (htmlString != null && htmlString.length() == 0)
htmlString = null;
java.lang.String value = (java.lang.String) FieldValidator.validateData(htmlString, (StringFieldMetaData) FormDefinitionMeta.META_FOLLOW_ON_FORM_ALTERNATE, true);
setFollowOnFormAlternate(value);
} catch (ValidationException e) {
valid = false;
raiseError(request, ((StringFieldMetaData) FormDefinitionMeta.META_FOLLOW_ON_FORM_ALTERNATE).getLabelToken(), e);
}
// .//GEN-BEGIN:_doValidateMain_2_be
return valid;
}
use of org.jaffa.datatypes.exceptions.MandatoryFieldException in project jaffa-framework by jaffa-projects.
the class MessageViewerComponent method display.
/**
* This retrieves the details for the MessageHeader.
* @throws ApplicationExceptions This will be thrown in case any invalid data has been set, or if no data has been set.
* @throws FrameworkException Indicates some system error.
* @return The FormKey for the View screen.
*/
public FormKey display() throws ApplicationExceptions, FrameworkException {
ApplicationExceptions appExps = null;
if (getJMSMessageID() == null) {
if (appExps == null)
appExps = new ApplicationExceptions();
appExps.add(new MandatoryFieldException("[label.Jaffa.Messaging.Message.JMSMessageID]"));
}
if (getQueue() == null) {
if (appExps == null)
appExps = new ApplicationExceptions();
appExps.add(new MandatoryFieldException("[label.Jaffa.Messaging.QueueViewer.Queue]"));
}
if (appExps != null && appExps.size() > 0)
throw appExps;
doInquiry();
return getViewerFormKey();
}
Aggregations