Subversion Repositories XServices

Compare Revisions

No changes between revisions

Ignore whitespace Rev 53 → Rev 54

/xservices/trunk/src/java/net/brutex/xservices/types/FileSetResource.java
32,7 → 32,7
*/
@XmlType(name = "FileSetType", namespace = "http://ws.xservices.brutex.net",
propOrder = {"type", "source", "filter", "excludes", "casesensitive"})
public class FileSetResource {
public class FileSetResource implements ResourceSetInterface {
 
/**
* Type of FileSet
71,7 → 71,7
* @param p Ant project
* @return Ant FileSet for this file set.
*/
public FileSet getAntFileSet(Project p) {
public FileSet getAntResource(Project p) {
FileSet set = null;
switch (type) {
case ZIP:
106,7 → 106,8
/**
* File set types.
*/
@XmlEnum
@XmlEnum()
@XmlType(name="resourcetype")
public enum FileSetType {
 
/**
/xservices/trunk/src/java/net/brutex/xservices/types/SelectorTypeInterface.java
1,7 → 1,18
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Copyright 2011 Brian Rosenberger (Brutex Network)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
 
package net.brutex.xservices.types;
 
9,7 → 20,7
 
/**
*
* @author brian
* @author Brian Rosenberger
*/
public interface SelectorTypeInterface {
public FileSelector getSelector();
/xservices/trunk/src/java/net/brutex/xservices/types/ResourceInterface.java
20,7 → 20,7
import org.apache.tools.ant.types.Resource;
 
/**
* Wrapper for Ant Resources.
* Wrapper for a single file like Ant Resources.
*
* @author Brian Rosenberger, bru@brutex.de
*/
/xservices/trunk/src/java/net/brutex/xservices/types/ReturnCode.java
79,4 → 79,11
this.stdErr = stdErr;
this.property = props;
}
public String getProperty(String key) {
for(AntProperty prop : this.property) {
if(prop.equals(key)) return prop.value;
}
return null;
}
}
/xservices/trunk/src/java/net/brutex/xservices/types/ResourceSetInterface.java
0,0 → 1,35
/*
* Copyright 2011 Brian Rosenberger (Brutex Network)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
 
/**
* Wrapper for Ant Resource Sets. A resource set
* is simply a collection of resources.
*
* @author Brian Rosenberger, bru@brutex.de
*/
package net.brutex.xservices.types;
 
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.ResourceCollection;
/**
* Wrapper for Ant Resource Collection.
*
* @author Brian Rosenberger, bru@brutex.de
*/
public interface ResourceSetInterface {
public ResourceCollection getAntResource(Project p);
}
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/xservices/trunk/src/java/net/brutex/xservices/types/FileResource.java
19,7 → 19,8
import java.io.File;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
 
import net.brutex.xservices.util.BrutexNamespaces;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Resource;
30,9 → 31,10
/**
* File based resource declaration.
*
*
* @author Brian Rosenberger, bru@brutex.de
*/
@XmlRootElement(namespace=BrutexNamespaces.WS_XSERVICES, name="FileResourceType")
@XmlType(name="FileResourceType", namespace=BrutexNamespaces.WS_XSERVICES)
public class FileResource
implements ResourceInterface {
 
/xservices/trunk/src/java/net/brutex/xservices/types/AttachmentType.java
0,0 → 1,57
/*
* Copyright 2011 Brian Rosenberger (Brutex Network)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
 
package net.brutex.xservices.types;
 
import java.io.File;
import java.io.IOException;
 
import javax.activation.DataHandler;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlMimeType;
 
public class AttachmentType {
private DataHandler content;
private String filename = null;
 
public void setContent(DataHandler content) {
this.content = content;
}
 
@XmlMimeType("application/octet-stream")
@XmlElement(required=true)
public DataHandler getContent() {
return content;
}
public String getFilename() {
if(filename==null || filename.equals("")) {
try {
filename = File.createTempFile("XServices_", ".tmp").getPath();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
 
}
Property changes:
Added: svn:mime-type
+text/plain
\ No newline at end of property
/xservices/trunk/src/java/net/brutex/xservices/types/HostConnection.java
29,7 → 29,7
public HostConnection() {
}
 
@XmlElement(name="hostname", required=false, nillable=false)
@XmlElement(name="hostname", required=true, nillable=false)
public String hostname;
 
@XmlElement(name="port", required=false, nillable=false)