コード例 #1
0
 public DeliveryResult(String code, String text, Throwable error) {
   this(
       IDGenerator.getOrganisationID(),
       IDGenerator.nextID(DeliveryResult.class),
       code,
       text,
       error);
 }
コード例 #2
0
 /**
  * @param scriptLanguage
  * @param script
  * @param structField
  */
 public ScriptDataFieldValidator(
     String scriptLanguage, String script, StructField<?> structField) {
   this(
       IDGenerator.getOrganisationID(),
       IDGenerator.nextID(DataFieldValidator.class),
       scriptLanguage,
       script,
       structField);
 }
コード例 #3
0
 public DeliveryResult(Throwable error) {
   this(
       IDGenerator.getOrganisationID(),
       IDGenerator.nextID(DeliveryResult.class),
       error instanceof DeliveryException
           ? ((DeliveryException) error).getDeliveryResult().getCode()
           : CODE_FAILED,
       error instanceof DeliveryException
           ? ((DeliveryException) error).getDeliveryResult().getText()
           : error.getLocalizedMessage(),
       error instanceof DeliveryException
           ? ((DeliveryException) error).getDeliveryResult().getError()
           : error);
 }
コード例 #4
0
  /** Creates the columns with defalt variables filled in. */
  public List<ColumnDescriptor> getIssueTableColumnDescriptors(String... fieldNames) {
    MultiLanguagePropertiesBundle propertiesBundle =
        new MultiLanguagePropertiesBundle(
            "org.nightlabs.jfire.issue.resource.messages",
            IssueTableConfigModule.class.getClassLoader(),
            true);
    String organisationID = IDGenerator.getOrganisationID();

    List<ColumnDescriptor> columnDescs = new LinkedList<ColumnDescriptor>();
    for (String fieldName : fieldNames) {
      ColumnDescriptorID colDescID =
          ColumnDescriptorID.create(IDGenerator.nextID(ColumnDescriptor.class), organisationID);
      columnDescs.add(
          IssueTableColumnDescriptorFactory.fillColumnDescriptorInfos(
              new ColumnDescriptor(colDescID), fieldName, propertiesBundle));
    }

    return columnDescs;
  }
コード例 #5
0
 /**
  * Create a new HTMLContentFile instance.
  *
  * @param dataField The parent data field
  */
 public HTMLContentFile(HTMLDataField dataField) {
   this.organisationID = dataField.getOrganisationID();
   this.fileId = IDGenerator.nextID(HTMLContentFile.class);
   this.changeDT = new Date();
 }