licensing, imports, other tidyup

This commit is contained in:
danikov 2012-02-07 15:45:18 +00:00
parent 0feb27fd93
commit e8baca9b0a
9 changed files with 107 additions and 39 deletions

View File

@ -18,18 +18,11 @@
*/ */
package org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*; import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.*;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.*;
import java.net.URI; import java.net.URI;
import java.util.Set; import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
/** /**

View File

@ -18,9 +18,9 @@
*/ */
package org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*; import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.*; import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.*; import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NS;
import java.net.URI; import java.net.URI;
import java.util.Set; import java.util.Set;
@ -143,6 +143,7 @@ public class EntityType<T extends EntityType<T>> extends ResourceType<T> {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@SuppressWarnings("unchecked")
@Override @Override
public Builder<T> fromResourceType(ResourceType<T> in) { public Builder<T> fromResourceType(ResourceType<T> in) {
return Builder.class.cast(super.fromResourceType(in)); return Builder.class.cast(super.fromResourceType(in));

View File

@ -1,8 +1,26 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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 org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*; import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.*; import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.*; import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NS;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;

View File

@ -1,7 +1,25 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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 org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*; import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.*; import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI; import java.net.URI;
import java.util.Map; import java.util.Map;

View File

@ -1,3 +1,21 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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 org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal; import static com.google.common.base.Objects.equal;
@ -15,6 +33,15 @@ import com.google.common.base.Objects.ToStringHelper;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
/**
* Represents a set of metadata
*
* <pre>
* &lt;xs:complexType name="Metadata"&gt;
* </pre>
*
* @author danikov
*/
@XmlRootElement(namespace = NS, name = "Metadata") @XmlRootElement(namespace = NS, name = "Metadata")
public class Metadata extends ResourceType<Metadata>{ public class Metadata extends ResourceType<Metadata>{

View File

@ -1,3 +1,21 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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 org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal; import static com.google.common.base.Objects.equal;
@ -7,7 +25,6 @@ import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NS;
import java.net.URI; import java.net.URI;
import java.util.Set; import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@ -15,7 +32,16 @@ import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper; import com.google.common.base.Objects.ToStringHelper;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@XmlRootElement(namespace = NS, name = "org/metadata") /**
* Represents a metadata entry
*
* <pre>
* &lt;xs:complexType name="MetadataType"&gt;
* </pre>
*
* @author danikov
*/
@XmlRootElement(namespace = NS, name = "TODO")
public class MetadataEntry extends ResourceType<MetadataEntry> { public class MetadataEntry extends ResourceType<MetadataEntry> {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -106,7 +132,7 @@ public class MetadataEntry extends ResourceType<MetadataEntry> {
this.value = checkNotNull(value, "value"); this.value = checkNotNull(value, "value");
} }
@XmlAttribute @XmlElement(namespace = NS, name = "K")
private String key; private String key;
@XmlElement(namespace = NS, name = "Value") @XmlElement(namespace = NS, name = "Value")
private String value; private String value;

View File

@ -18,22 +18,11 @@
*/ */
package org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*; import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.*;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.*;
import java.net.URI; import java.net.URI;
import java.util.Set; import java.util.Set;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
/** /**

View File

@ -18,9 +18,9 @@
*/ */
package org.jclouds.vcloud.director.v1_5.domain; package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.*; import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.*; import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.*; import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NS;
import java.net.URI; import java.net.URI;
import java.util.Date; import java.util.Date;

View File

@ -18,12 +18,10 @@
*/ */
package org.jclouds.vcloud.director.v1_5.features; package org.jclouds.vcloud.director.v1_5.features;
import static org.testng.Assert.*; import static org.testng.Assert.assertEquals;
import java.net.URI; import java.net.URI;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient; import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType; import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
import org.jclouds.vcloud.director.v1_5.domain.Link; import org.jclouds.vcloud.director.v1_5.domain.Link;
@ -35,8 +33,6 @@ import org.jclouds.vcloud.director.v1_5.domain.Reference;
import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorRestClientExpectTest; import org.jclouds.vcloud.director.v1_5.internal.BaseVCloudDirectorRestClientExpectTest;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMultimap;
/** /**
* Allows us to test a client via its side effects. * Allows us to test a client via its side effects.
* *