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 @@
<tbody data-link="row" class="rowlink">
<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-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>
</tr>
<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-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>
</tr>
</tbody>
......@@ -245,7 +245,7 @@
<tbody data-link="row" class="rowlink">
<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-size">7.57K</span></td>
<td><span class="downloadfile-size">7.63K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
This diff is collapsed.
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<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>
<table class="table datatype-properties">
......
......@@ -654,6 +654,14 @@ provisioner to request for cloud resources.]]>
</xs:documentation>
</xs:annotation>
<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>
<xs:element name="username" type="xs:string" minOccurs="0">
......
......@@ -156,6 +156,25 @@
</span>
</td>
<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>
</tr>
<tr>
......@@ -218,6 +237,7 @@
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;u-----&gt;
&lt;id&gt;58e3946e0fb4f562d84ba1ad&lt;/id&gt;
&lt;password&gt;...&lt;/password&gt;
&lt;username&gt;user&lt;/username&gt;
&lt;accountNonExpired&gt;true&lt;/accountNonExpired&gt;
......
......@@ -17,6 +17,7 @@ package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample;
import java.util.List;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
/**
......@@ -72,6 +73,7 @@ public class CloudCredentials extends OwnedObject {
/**
* The access key ID for a cloud provider.
*
* @return the accessKeyId
*/
@DocumentationExample("AKIKIQY9K1ZUQ6M7YBSQ")
......
......@@ -15,6 +15,8 @@
*/
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;
/**
......
......@@ -16,7 +16,6 @@
package nl.uva.sne.drip.data.v1.external;
import nl.uva.sne.drip.api.exception.KeyException;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
/**
......
......@@ -16,9 +16,9 @@
package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;
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
......@@ -26,7 +26,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
*
* @author S. Koulouzis
*/
@Document
@MappedSuperclass
public class OwnedObject {
@Id
......@@ -64,11 +64,4 @@ public class OwnedObject {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
}
......@@ -19,6 +19,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
/**
* This class represents a playbook used by ansible manager to deploy software.
*
* @author S. Koulouzis
*/
@Document
......
......@@ -15,19 +15,22 @@
*/
package nl.uva.sne.drip.data.v1.external;
import com.webcohesion.enunciate.metadata.DocumentationExample;
import java.util.List;
import org.springframework.data.annotation.Id;
/**
* This class represents a description of provisioned resources
*
* @author S. Koulouzis
*/
public class ProvisionResponse extends ProvisionRequest{
public class ProvisionResponse extends ProvisionRequest {
private List<DeployParameter> deployParameters;
/**
* The deploy parameters.
*
* @return the deployParameters
*/
public List<DeployParameter> getDeployParameters() {
......
......@@ -25,29 +25,12 @@ import org.springframework.data.mongodb.core.mapping.Document;
* @author S. Koulouzis
*/
@Document
public class Script extends OwnedObject{
@Id
private String id;
public class Script extends OwnedObject {
private String contents;
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
*
......
......@@ -16,10 +16,12 @@
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;
/**
* This class is a representation of a TOSCA description.
*
* @author S. Koulouzis
*/
@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