Commit 15261762 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Fixed "Attempt to add id property private java.lang.String" bug

Had to add @MappedSuperclass to OwnedObject.
Solution found at http://stackoverflow.com/questions/38803532/entity-inheritance-attempt-to-add-id-property-private-but-already-have-prope
parent 79b7861d
...@@ -144,12 +144,12 @@ ...@@ -144,12 +144,12 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-xml-client.jar"> <tr class="clickable-row" data-href="drip-api-xml-client.jar">
<td><span class="downloadfile-name">drip-api-xml-client.jar</span></td> <td><span class="downloadfile-name">drip-api-xml-client.jar</span></td>
<td><span class="downloadfile-size">21.28K</span></td> <td><span class="downloadfile-size">21.37K</span></td>
<td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td> <td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td>
</tr> </tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar"> <tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td> <td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">19.81K</span></td> <td><span class="downloadfile-size">19.88K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td> <td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr> </tr>
</tbody> </tbody>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip"> <tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td> <td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">7.57K</span></td> <td><span class="downloadfile-size">7.63K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
......
This diff is collapsed.
...@@ -69,7 +69,7 @@ class</p> ...@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>Subtypes</dt> <dt>Subtypes</dt>
<dd><a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_KeyPair.html">KeyPair</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_Script.html">Script</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd> <dd><a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_KeyPair.html">KeyPair</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_Script.html">Script</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -654,6 +654,14 @@ provisioner to request for cloud resources.]]> ...@@ -654,6 +654,14 @@ provisioner to request for cloud resources.]]>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:sequence> <xs:sequence>
<xs:element name="id" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The unique id of this object. This value is auto-generated when the DAO
saves this object]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="password" type="xs:string" minOccurs="0"> <xs:element name="password" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="username" type="xs:string" minOccurs="0"> <xs:element name="username" type="xs:string" minOccurs="0">
......
...@@ -156,6 +156,25 @@ ...@@ -156,6 +156,25 @@
</span> </span>
</td> </td>
<td> <span class="property-description">If the account is enabled</span> <td> <span class="property-description">If the account is enabled</span>
</td>
</tr>
<tr>
<td> <span class="property-name">id</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-type">element
</span>
</td>
<td> <span class="property-namespaceInfo">
</span>
</td>
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">The unique id of this object. This value is auto-generated when the DAO
saves this object</span>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -218,6 +237,7 @@ ...@@ -218,6 +237,7 @@
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;u-----&gt; <pre class="prettyprint language-xml example">&lt;u-----&gt;
&lt;id&gt;58e3946e0fb4f562d84ba1ad&lt;/id&gt;
&lt;password&gt;...&lt;/password&gt; &lt;password&gt;...&lt;/password&gt;
&lt;username&gt;user&lt;/username&gt; &lt;username&gt;user&lt;/username&gt;
&lt;accountNonExpired&gt;true&lt;/accountNonExpired&gt; &lt;accountNonExpired&gt;true&lt;/accountNonExpired&gt;
......
...@@ -17,6 +17,7 @@ package nl.uva.sne.drip.data.v1.external; ...@@ -17,6 +17,7 @@ package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample; import com.webcohesion.enunciate.metadata.DocumentationExample;
import java.util.List; import java.util.List;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
/** /**
...@@ -71,7 +72,8 @@ public class CloudCredentials extends OwnedObject { ...@@ -71,7 +72,8 @@ public class CloudCredentials extends OwnedObject {
} }
/** /**
* The access key ID for a cloud provider. * The access key ID for a cloud provider.
*
* @return the accessKeyId * @return the accessKeyId
*/ */
@DocumentationExample("AKIKIQY9K1ZUQ6M7YBSQ") @DocumentationExample("AKIKIQY9K1ZUQ6M7YBSQ")
...@@ -88,7 +90,7 @@ public class CloudCredentials extends OwnedObject { ...@@ -88,7 +90,7 @@ public class CloudCredentials extends OwnedObject {
/** /**
* The IDs of of the key pairs for accessing the VMs of that cloud provider. * The IDs of of the key pairs for accessing the VMs of that cloud provider.
* *
* @return the keyPairIDs * @return the keyPairIDs
*/ */
@DocumentationExample("AKIKIQY9K1ZUQ6M7YBSQ, LKJ2KIQY9K1F236M7YASD") @DocumentationExample("AKIKIQY9K1ZUQ6M7YBSQ, LKJ2KIQY9K1F236M7YASD")
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
*/ */
package nl.uva.sne.drip.data.v1.external; package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
/** /**
...@@ -28,7 +30,7 @@ import org.springframework.data.mongodb.core.mapping.Document; ...@@ -28,7 +30,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
public class DeployResponse extends DeployRequest { public class DeployResponse extends DeployRequest {
private KeyPair key; private KeyPair key;
public void setKey(KeyPair key) { public void setKey(KeyPair key) {
this.key = key; this.key = key;
} }
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package nl.uva.sne.drip.data.v1.external; package nl.uva.sne.drip.data.v1.external;
import nl.uva.sne.drip.api.exception.KeyException; import nl.uva.sne.drip.api.exception.KeyException;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
/** /**
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
package nl.uva.sne.drip.data.v1.external; package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample; import com.webcohesion.enunciate.metadata.DocumentationExample;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
/** /**
* This is the base class for users to own resources. Many classes extend this * This is the base class for users to own resources. Many classes extend this
...@@ -26,7 +26,7 @@ import org.springframework.data.mongodb.core.mapping.Document; ...@@ -26,7 +26,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
* *
* @author S. Koulouzis * @author S. Koulouzis
*/ */
@Document @MappedSuperclass
public class OwnedObject { public class OwnedObject {
@Id @Id
...@@ -36,7 +36,7 @@ public class OwnedObject { ...@@ -36,7 +36,7 @@ public class OwnedObject {
private String owner; private String owner;
/** /**
* The owner (username) for the particular object. This value is set when * The owner (username) for the particular object. This value is set when
* the DAO saves the object based on the principal how made the call * the DAO saves the object based on the principal how made the call
* *
* @return the owner * @return the owner
...@@ -54,7 +54,7 @@ public class OwnedObject { ...@@ -54,7 +54,7 @@ public class OwnedObject {
} }
/** /**
* The UID of this object. This value is auto generated by the DAO when the * The UID of this object. This value is auto generated by the DAO when the
* object is saved. * object is saved.
* *
* @return the id * @return the id
...@@ -64,11 +64,4 @@ public class OwnedObject { ...@@ -64,11 +64,4 @@ public class OwnedObject {
return id; return id;
} }
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
} }
...@@ -90,8 +90,8 @@ public class PlanResponse extends KeyValueHolder { ...@@ -90,8 +90,8 @@ public class PlanResponse extends KeyValueHolder {
} }
/** /**
* The list of the lower level plans attached to this plan. Some * The list of the lower level plans attached to this plan. Some
* provisioners use levels to represent a plan. In these cases there are two * provisioners use levels to represent a plan. In these cases there are two
* levels of TOSCA descriptions. * levels of TOSCA descriptions.
* *
* *
......
...@@ -19,6 +19,7 @@ import org.springframework.data.mongodb.core.mapping.Document; ...@@ -19,6 +19,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
/** /**
* This class represents a playbook used by ansible manager to deploy software. * This class represents a playbook used by ansible manager to deploy software.
*
* @author S. Koulouzis * @author S. Koulouzis
*/ */
@Document @Document
......
...@@ -15,19 +15,22 @@ ...@@ -15,19 +15,22 @@
*/ */
package nl.uva.sne.drip.data.v1.external; package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample;
import java.util.List; import java.util.List;
import org.springframework.data.annotation.Id;
/** /**
* This class represents a description of provisioned resources * This class represents a description of provisioned resources
*
* @author S. Koulouzis * @author S. Koulouzis
*/ */
public class ProvisionResponse extends ProvisionRequest{ public class ProvisionResponse extends ProvisionRequest {
private List<DeployParameter> deployParameters; private List<DeployParameter> deployParameters;
/** /**
* The deploy parameters. * The deploy parameters.
*
* @return the deployParameters * @return the deployParameters
*/ */
public List<DeployParameter> getDeployParameters() { public List<DeployParameter> getDeployParameters() {
...@@ -40,5 +43,5 @@ public class ProvisionResponse extends ProvisionRequest{ ...@@ -40,5 +43,5 @@ public class ProvisionResponse extends ProvisionRequest{
public void setDeployParameters(List<DeployParameter> deployParameters) { public void setDeployParameters(List<DeployParameter> deployParameters) {
this.deployParameters = deployParameters; this.deployParameters = deployParameters;
} }
} }
...@@ -25,29 +25,12 @@ import org.springframework.data.mongodb.core.mapping.Document; ...@@ -25,29 +25,12 @@ import org.springframework.data.mongodb.core.mapping.Document;
* @author S. Koulouzis * @author S. Koulouzis
*/ */
@Document @Document
public class Script extends OwnedObject{ public class Script extends OwnedObject {
@Id
private String id;
private String contents; private String contents;
private String name; private String name;
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/** /**
* The name of the script * The name of the script
* *
......
...@@ -16,10 +16,12 @@ ...@@ -16,10 +16,12 @@
package nl.uva.sne.drip.data.v1.external; package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample; import com.webcohesion.enunciate.metadata.DocumentationExample;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
/** /**
* This class is a representation of a TOSCA description. * This class is a representation of a TOSCA description.
*
* @author S. Koulouzis * @author S. Koulouzis
*/ */
@Document @Document
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment