Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
055ac648
Commit
055ac648
authored
Feb 06, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try ti define tosca
parent
e38a692c
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
409 additions
and
397 deletions
+409
-397
pom.xml
drip-commons/pom.xml
+4
-68
MessageParameter.java
.../nl/uva/sne/drip/drip/commons/model/MessageParameter.java
+0
-84
OwnedDocument.java
...ava/nl/uva/sne/drip/drip/commons/model/OwnedDocument.java
+0
-123
VM.java
.../src/main/java/nl/uva/sne/drip/drip/commons/model/VM.java
+0
-111
Artifact.java
...va/nl/uva/sne/drip/drip/commons/model/tosca/Artifact.java
+2
-2
Attribute.java
...a/nl/uva/sne/drip/drip/commons/model/tosca/Attribute.java
+3
-9
Constraint.java
.../nl/uva/sne/drip/drip/commons/model/tosca/Constraint.java
+33
-0
EntrySchema.java
...nl/uva/sne/drip/drip/commons/model/tosca/EntrySchema.java
+32
-0
Interface.java
...a/nl/uva/sne/drip/drip/commons/model/tosca/Interface.java
+24
-0
Property.java
...va/nl/uva/sne/drip/drip/commons/model/tosca/Property.java
+50
-0
PropertyStatus.java
...uva/sne/drip/drip/commons/model/tosca/PropertyStatus.java
+28
-0
Requirement.java
...nl/uva/sne/drip/drip/commons/model/tosca/Requirement.java
+24
-0
Capabilities.java
...p/drip/commons/model/tosca/capabilities/Capabilities.java
+40
-0
NodeState.java
...va/sne/drip/drip/commons/model/tosca/nodes/NodeState.java
+24
-0
RootNode.java
...uva/sne/drip/drip/commons/model/tosca/nodes/RootNode.java
+145
-0
No files found.
drip-commons/pom.xml
View file @
055ac648
...
@@ -10,77 +10,13 @@
...
@@ -10,77 +10,13 @@
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-data-jpa
</artifactId>
<artifactId>
spring-boot-starter-data-neo4j
</artifactId>
<type>
jar
</type>
</dependency>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.12
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.hamcrest
</groupId>
<artifactId>
hamcrest-core
</artifactId>
<version>
1.3
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
javax
</groupId>
<artifactId>
javaee-web-api
</artifactId>
<version>
6.0
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-databind
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-mongodb
</artifactId>
<type>
jar
</type>
</dependency>
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
<version>
1.3.2
</version>
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-rest-core
</artifactId>
<type>
jar
</type>
</dependency>
<dependency>
<groupId>
org.json
</groupId>
<artifactId>
json
</artifactId>
<version>
20090211
</version>
<type>
jar
</type>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-core
</artifactId>
<type>
jar
</type>
</dependency>
<dependency>
<groupId>
com.webcohesion.enunciate
</groupId>
<artifactId>
enunciate-core-annotations
</artifactId>
<version>
2.9.1
</version>
<type>
jar
</type>
</dependency>
<dependency>
<dependency>
<groupId>
com.rabbitmq
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
amqp-client
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/MessageParameter.java
deleted
100644 → 0
View file @
e38a692c
/*
* Copyright 2017 S. Koulouzis.
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
java.io.Serializable
;
import
java.util.Map
;
/**
*
* @author S. Koulouzis.
*/
public
class
MessageParameter
implements
Serializable
{
private
String
url
;
private
String
encoding
;
private
String
value
;
private
String
name
;
private
Map
<
String
,
String
>
attributes
;
public
static
final
String
NAME
=
"name"
;
public
static
final
String
URL
=
"url"
;
public
static
final
String
VALUE
=
"value"
;
public
static
final
String
ENCODING
=
"encoding"
;
public
String
getURL
()
{
return
this
.
url
;
}
public
void
setURL
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getEncoding
()
{
return
this
.
encoding
;
}
public
void
setEncoding
(
String
encoding
)
{
this
.
encoding
=
encoding
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
String
getValue
()
{
return
this
.
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
/**
* @return the attributes
*/
public
Map
<
String
,
String
>
getAttributes
()
{
return
attributes
;
}
/**
* @param attributes the attributes to set
*/
public
void
setAttributes
(
Map
<
String
,
String
>
attributes
)
{
this
.
attributes
=
attributes
;
}
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/OwnedDocument.java
deleted
100644 → 0
View file @
e38a692c
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.webcohesion.enunciate.metadata.DocumentationExample
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
javax.persistence.EntityListeners
;
import
javax.persistence.Id
;
import
javax.persistence.MappedSuperclass
;
import
javax.persistence.PrePersist
;
import
javax.persistence.Temporal
;
import
javax.persistence.TemporalType
;
import
static
javax
.
persistence
.
TemporalType
.
TIMESTAMP
;
import
javax.validation.constraints.NotNull
;
import
org.springframework.data.annotation.CreatedBy
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
org.springframework.security.core.userdetails.User
;
/**
* This is the base class for users to own resources. Many classes extend this
* class
*
* @author S. Koulouzis
*/
@MappedSuperclass
@EntityListeners
(
AuditingEntityListener
.
class
)
abstract
class
OwnedDocument
{
@Id
private
String
id
;
@CreatedBy
protected
User
owner
;
@CreatedDate
@Temporal
(
TIMESTAMP
)
private
Date
creationDate
;
@LastModifiedBy
private
User
modifier
;
@LastModifiedDate
@Temporal
(
TIMESTAMP
)
protected
Date
modificationdDate
;
/**
* The owner (username) for the particular object. This value is set when
* the DAO saves the object based on the principal who made the call. It is
* created automatically. No need to set during a POST
*
* @return the owner
*/
@DocumentationExample
(
"user1"
)
public
User
getOwner
()
{
return
owner
;
}
/**
* @param owner the ownerID to set
*/
public
void
setOwner
(
User
owner
)
{
this
.
owner
=
owner
;
}
/**
* The UID of this object. This value is auto generated by the DAO when the
* object is saved.
*
* @return the id
*/
@DocumentationExample
(
"58e3946e0fb4f562d84ba1ad"
)
public
String
getId
()
{
return
id
;
}
/**
* @return the modifier
*/
@DocumentationExample
(
"user1"
)
public
User
getModifieder
()
{
return
modifier
;
}
/**
* @param modifieder the modifier to set
*/
public
void
setModifieder
(
User
modifieder
)
{
this
.
modifier
=
modifieder
;
}
/**
* @return the creationDate
*/
public
Date
getCreationDate
()
{
return
creationDate
;
}
/**
* @param creationDate the creationDate to set
*/
public
void
setCreationDate
(
Date
creationDate
)
{
this
.
creationDate
=
creationDate
;
}
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/VM.java
deleted
100644 → 0
View file @
e38a692c
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
import
com.webcohesion.enunciate.metadata.DocumentationExample
;
/**
* The lowest level is the VM level. It describes the types of VMs required,
* mainly referring to the computing capacities, CPU, memory, etc
*
* @author S. Koulouzis
*/
public
class
VM
{
/**
* This field can be omitted. After provisioning, you can check the actual
* public address of this VM from this field.
* @return the publicAddress
*/
@DocumentationExample
(
"145.18.150.10"
)
public
String
getPublicAddress
()
{
return
publicAddress
;
}
/**
* @param publicAddress the publicAddress to set
*/
public
void
setPublicAddress
(
String
publicAddress
)
{
this
.
publicAddress
=
publicAddress
;
}
/**
* It indicates the specific operating system required by the application.
* The value of above two fields should be supported by the Cloud database
* information.
*
* @return the osType
*/
@DocumentationExample
(
"Ubuntu 14.04"
)
public
String
getOsType
()
{
return
osType
;
}
/**
* @param osType the osType to set
*/
public
void
setOsType
(
String
osType
)
{
this
.
osType
=
osType
;
}
/**
* It indicates the computing capacity of the VM, such as t2.small or
* t2.medium for Cloud EC2.
*
* @return the nodeType
*/
@DocumentationExample
(
"t2.small"
)
public
String
getNodeType
()
{
return
nodeType
;
}
/**
* @param nodeType the nodeType to set
*/
public
void
setNodeType
(
String
nodeType
)
{
this
.
nodeType
=
nodeType
;
}
/**
* A user-defined node name of this VM. It should be unique in the entire
* infrastructure, e.g., node1. This will also be the hostname of this VM.
* And this VM can be accessed from other connected VMs with this hostname,
* e.g., ping node1.
*
* @return the name
*/
@DocumentationExample
(
"node1"
)
public
String
getName
()
{
return
name
;
}
/**
* @param name the name to set
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
private
String
name
;
private
String
nodeType
;
private
String
osType
;
private
String
publicAddress
;
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/
Status
.java
→
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/
tosca/Artifact
.java
View file @
055ac648
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
/**
/**
*
*
* @author S. Koulouzis
* @author S. Koulouzis
*/
*/
abstract
class
Description
extends
OwnedDocument
{
public
class
Artifact
{
}
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/
InfrastructureDescription
.java
→
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/
tosca/Attribute
.java
View file @
055ac648
...
@@ -13,18 +13,12 @@
...
@@ -13,18 +13,12 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
import
java.util.List
;
/**
/**
* Description of the infrastructure including network VMs etc.
*
*
* @author S. Koulouzis
* @author S. Koulouzis
*/
*/
public
class
InfrastructureDescription
extends
Description
{
public
abstract
class
Attribute
{
private
List
<
VM
>
VMs
;
}
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/Constraint.java
0 → 100644
View file @
055ac648
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
/**
*
* @author S. Koulouzis
*/
public
enum
Constraint
{
EQUAL
,
GREATERTHAN
,
GREATEROREQUAL
,
LESSTHAN
,
INRANGE
,
VALIDVALUES
,
LENGTH
,
MINLENGTH
,
MAXLENGTH
,
PATTERN
;
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/EntrySchema.java
0 → 100644
View file @
055ac648
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
import
java.util.List
;
/**
*
* @author S. Koulouzis
*/
public
abstract
class
EntrySchema
{
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"type"
)
private
String
type
;
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"description"
)
private
String
description
;
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"constraints"
)
private
List
<
Constraint
>
constraints
;
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/Interface.java
0 → 100644
View file @
055ac648
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
/**
*
* @author S. Koulouzis
*/
public
abstract
class
Interface
{
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/
Message
.java
→
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/
tosca/Property
.java
View file @
055ac648
/*
/*
* Copyright 201
7 S. Koulouzis.
* Copyright 201
9 S. Koulouzis, Huan Zhou, Yang Hu
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -13,60 +13,38 @@
...
@@ -13,60 +13,38 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
;
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
//import javax.persistence.Column;
import
javax.xml.bind.annotation.XmlAttribute
;
//import javax.persistence.Entity;
import
javax.xml.bind.annotation.XmlElement
;
//import javax.persistence.GeneratedValue;
import
javax.xml.namespace.QName
;
//import javax.persistence.GenerationType;
//import javax.persistence.Id;
//import javax.persistence.Temporal;
//import javax.persistence.TemporalType;
/**
/**
*
*
*
* @author S. Koulouzis
*
* @author S. Koulouzis.
*/
*/
public
class
Message
implements
Serializable
{
public
abstract
class
Property
{
private
String
owner
;
private
Long
creationDate
;
private
List
<
MessageParameter
>
parameters
;
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"type"
)
private
String
type
;
public
Long
getCreationDate
()
{
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"description"
)
return
this
.
creationDate
;
private
String
description
;
}
public
void
setParameters
(
List
<
MessageParameter
>
parameters
)
{
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"required"
)
this
.
parameters
=
parameters
;
private
Boolean
required
;
}
public
List
<
MessageParameter
>
getParameters
()
{
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"default"
)
return
this
.
parameters
;
private
Object
defaultValue
;
}
public
void
setCreationDate
(
Long
creationDate
)
{
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"status"
)
this
.
creationDate
=
creationDate
;
private
PropertyStatus
status
;
}
/**
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"constraints"
)
* @return the owner
private
List
<
Constraint
>
constraints
;
*/
public
String
getOwner
()
{
return
owner
;
}
/**
@org
.
neo4j
.
ogm
.
annotation
.
Property
(
name
=
"entry_schema"
)
* @param owner the owner to set
private
EntrySchema
entrySchema
;
*/
public
void
setOwner
(
String
owner
)
{
this
.
owner
=
owner
;
}
}
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/PropertyStatus.java
0 → 100644
View file @
055ac648
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
/**
*
* @author S. Koulouzis
*/
public
enum
PropertyStatus
{
SUPPORTED
,
UNSUPPORTED
,
EXPERIMENTAL
,
DEPRECTED
;
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/Requirement.java
0 → 100644
View file @
055ac648
/*
* Copyright 2019 S. Koulouzis, Huan Zhou, Yang Hu
*
* 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
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
;
/**
*
* @author S. Koulouzis
*/
public
abstract
class
Requirement
{
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/capabilities/Capabilities.java
0 → 100644
View file @
055ac648
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
.
capabilities
;
import
java.util.List
;
import
java.util.Map
;
import
javax.xml.bind.annotation.XmlAttribute
;
import
javax.xml.namespace.QName
;
import
nl.uva.sne.drip.drip.commons.model.tosca.Attribute
;
import
org.neo4j.ogm.annotation.Properties
;
import
org.neo4j.ogm.annotation.Property
;
/**
* http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/os/TOSCA-Simple-Profile-YAML-v1.0-os.html#DEFN_TYPE_CAPABILITIES_ROOT
*
* @author alogo
*/
public
abstract
class
Capabilities
{
@Property
(
name
=
"type"
)
private
String
type
;
@Property
(
name
=
"description"
)
private
String
description
;
@Property
(
name
=
"valid_source_types"
)
private
List
<
String
>
validSourceTypes
;
@Property
(
name
=
"occurrences"
)
private
List
<
String
>
occurrences
;
@Properties
private
Map
<
String
,
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
.
Property
>
properties
;
@Properties
private
Map
<
String
,
Attribute
>
attributes
;
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/nodes/NodeState.java
0 → 100644
View file @
055ac648
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
.
nodes
;
/**
*
* @author S. Koulouzis
*/
//http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/os/TOSCA-Simple-Profile-YAML-v1.0-os.html#DEFN_TOSCA_VALUES_STATE
public
enum
NodeState
{
INITIAL
,
CREATING
,
CREATED
,
CONFIGURING
,
CONFIGURED
,
STARTING
,
STARTED
,
STOPPING
,
DELETING
,
ERROR
;
}
drip-commons/src/main/java/nl/uva/sne/drip/drip/commons/model/tosca/nodes/RootNode.java
0 → 100644
View file @
055ac648
package
nl
.
uva
.
sne
.
drip
.
drip
.
commons
.
model
.
tosca
.
nodes
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
nl.uva.sne.drip.drip.commons.model.tosca.Artifact
;
import
nl.uva.sne.drip.drip.commons.model.tosca.Attribute
;
import
nl.uva.sne.drip.drip.commons.model.tosca.Interface
;
import
nl.uva.sne.drip.drip.commons.model.tosca.Requirement
;
import
nl.uva.sne.drip.drip.commons.model.tosca.capabilities.Capabilities
;
import
org.neo4j.ogm.annotation.GeneratedValue
;
import
org.neo4j.ogm.annotation.Id
;
import
org.neo4j.ogm.annotation.NodeEntity
;
import
org.neo4j.ogm.annotation.Properties
;
import
org.neo4j.ogm.annotation.Property
;
/**
*
* @author S. Koulouzis
*/
@NodeEntity
public
abstract
class
RootNode
{
@Id
@GeneratedValue
private
Long
tosca_id
;
@Property
(
name
=
"tosca_name"
)
private
String
tosca_name
;
@Property
(
name
=
"state"
)
private
NodeState
state
;
@Properties
private
Map
<
String
,
Capabilities
>
capabilities
;
@Properties
private
Map
<
String
,
Attribute
>
attributes
;
@Properties
private
List
<
Requirement
>
requirements
;
@Properties
private
Map
<
String
,
Interface
>
interfaces
;
@Properties
private
Map
<
String
,
Artifact
>
artifacts
;
/**
* @return the tosca_name
*/
public
String
getTosca_name
()
{
return
tosca_name
;
}
/**
* @param tosca_name the tosca_name to set
*/
public
void
setTosca_name
(
String
tosca_name
)
{
this
.
tosca_name
=
tosca_name
;
}
/**
* @return the state
*/
public
NodeState
getState
()
{
return
state
;
}
/**
* @param state the state to set
*/
public
void
setState
(
NodeState
state
)
{
this
.
state
=
state
;
}
/**
* @return the capabilities
*/
public
Map
<
String
,
Capabilities
>
getCapabilities
()
{
return
capabilities
;
}
/**
* @param capabilities the capabilities to set
*/
public
void
setCapabilities
(
Map
<
String
,
Capabilities
>
capabilities
)
{
this
.
capabilities
=
capabilities
;
}
/**
* @return the attributes
*/
public
Map
<
String
,
Attribute
>
getAttributes
()
{
return
attributes
;
}
/**
* @param attributes the attributes to set
*/
public
void
setAttributes
(
Map
<
String
,
Attribute
>
attributes
)
{
this
.
attributes
=
attributes
;
}
/**
* @return the requirements
*/
public
List
<
Requirement
>
getRequirements
()
{
return
requirements
;
}
/**
* @param requirements the requirements to set
*/
public
void
setRequirements
(
List
<
Requirement
>
requirements
)
{
this
.
requirements
=
requirements
;
}
/**
* @return the interfaces
*/
public
Map
<
String
,
Interface
>
getInterfaces
()
{
return
interfaces
;
}
/**
* @param interfaces the interfaces to set
*/
public
void
setInterfaces
(
Map
<
String
,
Interface
>
interfaces
)
{
this
.
interfaces
=
interfaces
;
}
/**
* @return the artifacts
*/
public
Map
<
String
,
Artifact
>
getArtifacts
()
{
return
artifacts
;
}
/**
* @param artifacts the artifacts to set
*/
public
void
setArtifacts
(
Map
<
String
,
Artifact
>
artifacts
)
{
this
.
artifacts
=
artifacts
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment