Add new types
git-svn-id: https://brutex.net/svn/xservices/trunk@74 e7e49efb-446e-492e-b9ec-fcafc1997a86tag-20130205r
parent
681b5580e2
commit
42ec4fb39d
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* Copyright 2010 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.util.UUID;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Defines a collection of storable objects.
|
||||
*
|
||||
* @author Brian Rosenberger
|
||||
* @since 1.0
|
||||
*/
|
||||
@XmlType()
|
||||
public class CollectionType {
|
||||
|
||||
private String name="";
|
||||
final private UUID uuid;
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name to set
|
||||
*/
|
||||
@XmlElement(required=true)
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public String getUuid() {
|
||||
return uuid.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @param uuid
|
||||
*/
|
||||
public CollectionType(String name, UUID uuid) {
|
||||
this.name = name;
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @param uuid
|
||||
*/
|
||||
public CollectionType(String name) {
|
||||
this.name = name;
|
||||
this.uuid = UUID.randomUUID();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
public CollectionType() {
|
||||
this.name = "";
|
||||
this.uuid = UUID.randomUUID();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* Copyright 2012 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 net.brutex.xservices.util.BrutexNamespaces;
|
||||
|
||||
import org.apache.cxf.aegis.type.java5.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Brian Rosenberger, bru@brutex.de
|
||||
*/
|
||||
@XmlType(name=HostinfoType.XML_NAME, namespace=BrutexNamespaces.WS_XSERVICES)
|
||||
public class HostinfoType {
|
||||
|
||||
public final static String XML_NAME="hostinfo";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public HostinfoType() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @param domain
|
||||
* @param ip4
|
||||
* @param ip6
|
||||
*/
|
||||
public HostinfoType(String name, String domain, String ip4, String ip6) {
|
||||
this.name = name;
|
||||
this.domain = domain;
|
||||
this.ip4 = ip4;
|
||||
this.ip6 = ip6;
|
||||
}
|
||||
|
||||
private String name;
|
||||
private String domain;
|
||||
private String ip4;
|
||||
private String ip6;
|
||||
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* @return the domain
|
||||
*/
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
/**
|
||||
* @param domain the domain to set
|
||||
*/
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
/**
|
||||
* @return the ip4
|
||||
*/
|
||||
public String getIp4() {
|
||||
return ip4;
|
||||
}
|
||||
/**
|
||||
* @param ip4 the ip4 to set
|
||||
*/
|
||||
public void setIp4(String ip4) {
|
||||
this.ip4 = ip4;
|
||||
}
|
||||
/**
|
||||
* @return the ip6
|
||||
*/
|
||||
public String getIp6() {
|
||||
return ip6;
|
||||
}
|
||||
/**
|
||||
* @param ip6 the ip6 to set
|
||||
*/
|
||||
public void setIp6(String ip6) {
|
||||
this.ip6 = ip6;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,6 +1,17 @@
|
|||
/*
|
||||
* 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;
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2012 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 javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* Defines target nodes.
|
||||
*
|
||||
* @author Brian Rosenberger
|
||||
* @since 1.0
|
||||
*/
|
||||
@XmlType()
|
||||
public class TargetNodeType {
|
||||
|
||||
private String name="";
|
||||
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name to set
|
||||
*/
|
||||
@XmlElement(required=true)
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public TargetNodeType() {
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue