1.1 --- a/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/model/FileMessage.java Fri Apr 06 15:31:23 2007 +0000
1.2 +++ b/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/model/FileMessage.java Fri Apr 06 18:42:52 2007 +0000
1.3 @@ -1,4 +1,5 @@
1.4 /*
1.5 + *
1.6 * The contents of this file are subject to the terms of the Common Development
1.7 * and Distribution License (the License). You may not use this file except in
1.8 * compliance with the License.
1.9 @@ -22,41 +23,229 @@
1.10 * @author sweng
1.11 */
1.12 public interface FileMessage extends FileComponent {
1.13 + /**
1.14 + *
1.15 + */
1.16 public static final String ATTR_FILE_USE = "use";
1.17 + /**
1.18 + *
1.19 + */
1.20 public static final String ATTR_FILE_ENCODING_STYLE = "encodingStyle";
1.21 + /**
1.22 + *
1.23 + */
1.24 public static final String ATTR_FILE_TYPE = "fileType";
1.25 + /**
1.26 + *
1.27 + */
1.28 public static final String ATTR_FILE_NAME_IS_PATTERN = "fileNameIsPattern";
1.29 + /**
1.30 + *
1.31 + */
1.32 public static final String ATTR_FILE_NAME = "fileName";
1.33 + /**
1.34 + *
1.35 + */
1.36 public static final String ATTR_POLLING_INTERVAL = "pollingInterval";
1.37 + /**
1.38 + *
1.39 + */
1.40 public static final String ATTR_REMOVE_EOL = "removeEOL";
1.41 + /**
1.42 + *
1.43 + */
1.44 public static final String ATTR_ADD_EOL = "addEOL";
1.45 + /**
1.46 + *
1.47 + */
1.48 public static final String ATTR_MULTIPLE_RECORDS_PER_FILE = "multipleRecordsPerFile";
1.49 + /**
1.50 + *
1.51 + */
1.52 public static final String ATTR_RECORD_DELIM = "recordDelimiter";
1.53 + /**
1.54 + *
1.55 + */
1.56 public static final String ATTR_MAX_BYTES_PER_RECORD = "maxBytesPerRecord";
1.57 + /**
1.58 + *
1.59 + */
1.60 public static final String ATTR_PART = "part";
1.61 +
1.62 + /**
1.63 + *
1.64 + */
1.65 + public static final String ATTR_PROTECT_ENABLED = "protect";
1.66 + /**
1.67 + *
1.68 + */
1.69 + public static final String ATTR_ARCHIVE_ENABLED = "archive";
1.70 + /**
1.71 + *
1.72 + */
1.73 + public static final String ATTR_STAGING_ENABLED = "stage";
1.74 +
1.75 + /**
1.76 + *
1.77 + */
1.78 + public static final String ATTR_PROTECT_DIR = "protectDirectory";
1.79 + public static final String ATTR_PROTECT_DIR_IS_RELATIVE = "protectDirIsRelative";
1.80 + /**
1.81 + *
1.82 + */
1.83 + public static final String ATTR_ARCHIVE_DIR = "archiveDirectory";
1.84 + public static final String ATTR_ARCHIVE_DIR_IS_RELATIVE = "archiveDirIsRelative";
1.85 + /**
1.86 + *
1.87 + */
1.88 + public static final String ATTR_STAGING_DIR = "stageDirectory";
1.89 + public static final String ATTR_STAGING_DIR_IS_RELATIVE = "stageDirIsRelative";
1.90
1.91 + /**
1.92 + *
1.93 + * @param val
1.94 + */
1.95 public void setFileUseType(String val);
1.96 + /**
1.97 + *
1.98 + * @return
1.99 + */
1.100 public String getFileUseType();
1.101 + /**
1.102 + *
1.103 + * @param val
1.104 + */
1.105 public void setFileEncodingStyle(String val);
1.106 + /**
1.107 + *
1.108 + * @return
1.109 + */
1.110 public String getFileEncodingStyle();
1.111 + /**
1.112 + *
1.113 + * @param val
1.114 + */
1.115 public void setFileType(String val);
1.116 + /**
1.117 + *
1.118 + * @return
1.119 + */
1.120 public String getFileType();
1.121 + /**
1.122 + *
1.123 + * @param val
1.124 + */
1.125 public void setFileName(String val);
1.126 + /**
1.127 + *
1.128 + * @return
1.129 + */
1.130 public String getFileName();
1.131 + /**
1.132 + *
1.133 + * @param val
1.134 + */
1.135 public void setFileNameIsPattern(boolean val);
1.136 + /**
1.137 + *
1.138 + * @return
1.139 + */
1.140 public boolean getFileNameIsPattern();
1.141 + /**
1.142 + *
1.143 + * @param val
1.144 + */
1.145 public void setPollingInterval(long val);
1.146 + /**
1.147 + *
1.148 + * @return
1.149 + */
1.150 public Long getPollingInterval();
1.151 + /**
1.152 + *
1.153 + * @param val
1.154 + */
1.155 public void setMaxBytesPerRecord(long val);
1.156 + /**
1.157 + *
1.158 + * @return
1.159 + */
1.160 public Long getMaxBytesPerRecord();
1.161 + /**
1.162 + *
1.163 + * @param val
1.164 + */
1.165 public void setRecordDelimiter(String val);
1.166 + /**
1.167 + *
1.168 + * @return
1.169 + */
1.170 public String getRecordDelimiter();
1.171 + /**
1.172 + *
1.173 + * @param val
1.174 + */
1.175 public void setAddEOL(boolean val);
1.176 + /**
1.177 + *
1.178 + * @return
1.179 + */
1.180 public boolean getAddEOL();
1.181 + /**
1.182 + *
1.183 + * @param val
1.184 + */
1.185 public void setRemoveEOL(boolean val);
1.186 + /**
1.187 + *
1.188 + * @return
1.189 + */
1.190 public boolean getRemoveEOL();
1.191 + /**
1.192 + *
1.193 + * @param val
1.194 + */
1.195 public void setMultipleRecordsPerFile(boolean val);
1.196 + /**
1.197 + *
1.198 + * @return
1.199 + */
1.200 public boolean getMultipleRecordsPerFile();
1.201 + /**
1.202 + *
1.203 + * @param val
1.204 + */
1.205 public void setPart(String val);
1.206 + /**
1.207 + *
1.208 + * @return
1.209 + */
1.210 public String getPart();
1.211 +
1.212 + public boolean getArchiveEnabled();
1.213 + public void setArchiveEnabled(boolean b);
1.214 +
1.215 + public boolean getProtectEnabled();
1.216 + public void setProtectEnabled(boolean b);
1.217 +
1.218 + public boolean getStagingEnabled();
1.219 + public void setStagingEnabled(boolean b);
1.220 +
1.221 + public String getArchiveDirectory();
1.222 + public void setArchiveDirectory(String s);
1.223 +
1.224 + public String getProtectDirectory();
1.225 + public void setProtectDirectory(String s);
1.226 +
1.227 + public String getStagingDirectory();
1.228 + public void setStagingDirectory(String s);
1.229 +
1.230 + public boolean getArchiveDirIsRelative();
1.231 + public void setArchiveDirIsRelative(boolean b);
1.232 +
1.233 + public boolean getProtectDirIsRelative();
1.234 + public void setProtectDirIsRelative(boolean b);
1.235 +
1.236 + public boolean getStagingDirIsRelative();
1.237 + public void setStagingDirIsRelative(boolean b);
1.238 }
2.1 --- a/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/model/impl/FileAttribute.java Fri Apr 06 15:31:23 2007 +0000
2.2 +++ b/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/model/impl/FileAttribute.java Fri Apr 06 18:42:52 2007 +0000
2.3 @@ -19,7 +19,6 @@
2.4
2.5 package org.netbeans.modules.wsdlextensions.file.model.impl;
2.6
2.7 -import java.util.Collection;
2.8 import org.netbeans.modules.xml.xam.dom.Attribute;
2.9
2.10 /**
2.11 @@ -41,7 +40,16 @@
2.12 FILE_MESSAGE_ADDEOL_PROPERTY("addEOL"),
2.13 FILE_MESSAGE_MULTIPLERECORDSPERFILE_MESSAGE__PROPERTY("multipleRecordsPerFile"),
2.14 FILE_MESSAGE_RECORDDELIMITER_PROPERTY("recordDelimiter"),
2.15 - FILE_MESSAGE_MAXBYTESPERRECORD_PROPERTY("maxBytesPerRecord");
2.16 + FILE_MESSAGE_MAXBYTESPERRECORD_PROPERTY("maxBytesPerRecord"),
2.17 + FILE_MESSAGE_PROTECT_PROPERTY("protect"),
2.18 + FILE_MESSAGE_ARCHIVE_PROPERTY("archive"),
2.19 + FILE_MESSAGE_STAGE_PROPERTY("stage"),
2.20 + FILE_MESSAGE_PROTECT_DIR_PROPERTY("protectDirectory"),
2.21 + FILE_MESSAGE_ARCHIVE_DIR_PROPERTY("archiveDirectory"),
2.22 + FILE_MESSAGE_STAGE_DIR_PROPERTY("stageDirectory"),
2.23 + FILE_MESSAGE_PROTECT_DIR_IS_RELATIVE("protectDirIsRelative"),
2.24 + FILE_MESSAGE_ARCHIVE_DIR_IS_RELATIVE("archiveDirIsRelative"),
2.25 + FILE_MESSAGE_STAGE_DIR_IS_RELATIVE("stageDirIsRelative");
2.26
2.27 private String name;
2.28 private Class type;
3.1 --- a/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/model/impl/FileMessageImpl.java Fri Apr 06 15:31:23 2007 +0000
3.2 +++ b/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/model/impl/FileMessageImpl.java Fri Apr 06 18:42:52 2007 +0000
3.3 @@ -164,4 +164,82 @@
3.4 return getAttribute(FileAttribute.FILE_MESSAGE_PART_PROPERTY);
3.5 }
3.6
3.7 + public boolean getArchiveEnabled() {
3.8 + String s = getAttribute(FileAttribute.FILE_MESSAGE_ARCHIVE_PROPERTY);
3.9 + return s != null && s.equals("true");
3.10 + }
3.11 +
3.12 + public void setArchiveEnabled(boolean b) {
3.13 + setAttribute(ATTR_ARCHIVE_ENABLED, FileAttribute.FILE_MESSAGE_ARCHIVE_PROPERTY, b? "true" : "false");
3.14 + }
3.15 +
3.16 + public boolean getProtectEnabled() {
3.17 + String s = getAttribute(FileAttribute.FILE_MESSAGE_PROTECT_PROPERTY);
3.18 + return s != null && s.equals("true");
3.19 + }
3.20 +
3.21 + public void setProtectEnabled(boolean b) {
3.22 + setAttribute(ATTR_PROTECT_ENABLED, FileAttribute.FILE_MESSAGE_PROTECT_PROPERTY, b? "true" : "false");
3.23 + }
3.24 +
3.25 + public boolean getStagingEnabled() {
3.26 + String s = getAttribute(FileAttribute.FILE_MESSAGE_STAGE_PROPERTY);
3.27 + return s != null && s.equals("true");
3.28 + }
3.29 +
3.30 + public void setStagingEnabled(boolean b) {
3.31 + setAttribute(ATTR_STAGING_ENABLED, FileAttribute.FILE_MESSAGE_STAGE_PROPERTY, b? "true" : "false");
3.32 + }
3.33 +
3.34 + public String getArchiveDirectory() {
3.35 + return getAttribute(FileAttribute.FILE_MESSAGE_ARCHIVE_DIR_PROPERTY);
3.36 + }
3.37 +
3.38 + public void setArchiveDirectory(String s) {
3.39 + setAttribute(ATTR_ARCHIVE_DIR, FileAttribute.FILE_MESSAGE_ARCHIVE_DIR_PROPERTY, s);
3.40 + }
3.41 +
3.42 + public String getProtectDirectory() {
3.43 + return getAttribute(FileAttribute.FILE_MESSAGE_PROTECT_DIR_PROPERTY);
3.44 + }
3.45 +
3.46 + public void setProtectDirectory(String s) {
3.47 + setAttribute(ATTR_PROTECT_DIR, FileAttribute.FILE_MESSAGE_PROTECT_DIR_PROPERTY, s);
3.48 + }
3.49 +
3.50 + public String getStagingDirectory() {
3.51 + return getAttribute(FileAttribute.FILE_MESSAGE_STAGE_DIR_PROPERTY);
3.52 + }
3.53 +
3.54 + public void setStagingDirectory(String s) {
3.55 + setAttribute(ATTR_STAGING_DIR, FileAttribute.FILE_MESSAGE_STAGE_DIR_PROPERTY, s);
3.56 + }
3.57 +
3.58 + public boolean getArchiveDirIsRelative() {
3.59 + String s = getAttribute(FileAttribute.FILE_MESSAGE_ARCHIVE_DIR_IS_RELATIVE);
3.60 + return s != null && s.equals("true");
3.61 + }
3.62 +
3.63 + public void setArchiveDirIsRelative(boolean b) {
3.64 + setAttribute(ATTR_ARCHIVE_DIR_IS_RELATIVE, FileAttribute.FILE_MESSAGE_ARCHIVE_DIR_IS_RELATIVE, b? "true" : "false");
3.65 + }
3.66 +
3.67 + public boolean getProtectDirIsRelative() {
3.68 + String s = getAttribute(FileAttribute.FILE_MESSAGE_PROTECT_DIR_IS_RELATIVE);
3.69 + return s != null && s.equals("true");
3.70 + }
3.71 +
3.72 + public void setProtectDirIsRelative(boolean b) {
3.73 + setAttribute(ATTR_PROTECT_DIR_IS_RELATIVE, FileAttribute.FILE_MESSAGE_PROTECT_DIR_IS_RELATIVE, b? "true" : "false");
3.74 + }
3.75 +
3.76 + public boolean getStagingDirIsRelative() {
3.77 + String s = getAttribute(FileAttribute.FILE_MESSAGE_STAGE_DIR_IS_RELATIVE);
3.78 + return s != null && s.equals("true");
3.79 + }
3.80 +
3.81 + public void setStagingDirIsRelative(boolean b) {
3.82 + setAttribute(ATTR_STAGING_DIR_IS_RELATIVE, FileAttribute.FILE_MESSAGE_STAGE_DIR_IS_RELATIVE, b? "true" : "false");
3.83 + }
3.84 +
3.85 }
4.1 --- a/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/resources/file-ext.xsd Fri Apr 06 15:31:23 2007 +0000
4.2 +++ b/wsdlextensions.file/src/org/netbeans/modules/wsdlextensions/file/resources/file-ext.xsd Fri Apr 06 18:42:52 2007 +0000
4.3 @@ -111,6 +111,51 @@
4.4 <xs:documentation>Defines the record delimiter when multiple records are present. This value of this attribute is considered only if multipleRecordsPerFile is true. If no value is specified for this attribute but maxBytesPerRecord is defined when reading a file, it is assumed that each record is of fixed length with the length being the value defined for maxBytesPerRecord; Otherwise, the default record delimiter is line feed.</xs:documentation>
4.5 </xs:annotation>
4.6 </xs:attribute>
4.7 + <xs:attribute name="archive" type="xs:boolean" use="optional">
4.8 + <xs:annotation>
4.9 + <xs:documentation>Indicate if archive is required for processed (read) message, when true, processed message is archived, otherwise, it is removed, default is 'false'.</xs:documentation>
4.10 + </xs:annotation>
4.11 + </xs:attribute>
4.12 + <xs:attribute name="archiveDirectory" type="xs:string" use="optional">
4.13 + <xs:annotation>
4.14 + <xs:documentation>Directory where processed (read) message will be moved to, note, the message moved here is UUID tagged to avoid file name conflict in archive area, the value can be either an absolute or relative (relative to fileDirectory of <file:address>) directory, when left unspecified, 'archive' (relative to fileDirectory) is assumed.</xs:documentation>
4.15 + </xs:annotation>
4.16 + </xs:attribute>
4.17 + <xs:attribute name="archiveDirIsRelative" type="xs:boolean" use="optional">
4.18 + <xs:annotation>
4.19 + <xs:documentation>Indicate if archiveDirectory is relative to fileDirectory in <ftp:message>, default is 'true'.</xs:documentation>
4.20 + </xs:annotation>
4.21 + </xs:attribute>
4.22 + <xs:attribute name="protect" type="xs:boolean" use="optional">
4.23 + <xs:annotation>
4.24 + <xs:documentation>Indicate if overwrite protection is required for message write, when true, existing message will be moved to a directory before the current message is written, otherwise, existing message will be overwritten, default is 'false'.</xs:documentation>
4.25 + </xs:annotation>
4.26 + </xs:attribute>
4.27 + <xs:attribute name="protectDirectory" type="xs:string" use="optional">
4.28 + <xs:annotation>
4.29 + <xs:documentation>Directory where 'in the way' message will be moved to in order to avoid being overwritten by incoming message (with same file name), note, the message moved here is UUID tagged to avoid file name conflict in protect area, the value can be either an absolute or relative (relative to fileDirectory of <file:address>) directory, when left unspecified, 'protect' (relative to fileDirectory) is assumed.</xs:documentation>
4.30 + </xs:annotation>
4.31 + </xs:attribute>
4.32 + <xs:attribute name="protectDirIsRelative" type="xs:boolean" use="optional">
4.33 + <xs:annotation>
4.34 + <xs:documentation>Indicate if protectDirectory is relative to fileDirectory in <ftp:message>, default is 'true'.</xs:documentation>
4.35 + </xs:annotation>
4.36 + </xs:attribute>
4.37 + <xs:attribute name="stage" type="xs:boolean" use="optional">
4.38 + <xs:annotation>
4.39 + <xs:documentation>Indicate if staging is enabled for message write, i.e. the message is written to a staging area and moved to its destination when the complete message is written, default is 'false'.</xs:documentation>
4.40 + </xs:annotation>
4.41 + </xs:attribute>
4.42 + <xs:attribute name="stageDirectory" type="xs:string" use="optional">
4.43 + <xs:annotation>
4.44 + <xs:documentation>Directory for staging message write, note, the message moved here is UUID tagged to avoid being overwritten by other messages in staging area, the value can be either an absolute or relative (relative to fileDirectory of <file:address>) directory, when left unspecified, 'stage' (relative to fileDirectory) is assumed.</xs:documentation>
4.45 + </xs:annotation>
4.46 + </xs:attribute>
4.47 + <xs:attribute name="stageDirIsRelative" type="xs:boolean" use="optional">
4.48 + <xs:annotation>
4.49 + <xs:documentation>Indicate if stageDirectory is relative to fileDirectory in <ftp:message>, default is 'true'.</xs:documentation>
4.50 + </xs:annotation>
4.51 + </xs:attribute>
4.52 </xs:extension>
4.53 </xs:complexContent>
4.54 </xs:complexType>