Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adde more test #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions src/main/java/org/imsglobal/lti2/objects/provider/Message.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package org.imsglobal.lti2.objects.provider;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.util.List;

/**
* Message Object
*
*/
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class Message {
@JsonProperty("path")
private String path;
@JsonProperty("parameter")
private List<Parameter> parameter;
@JsonProperty("message_type")
private String messageType;
@JsonProperty("enabled_capability")
private List<String> enabledCapability;

@JsonProperty("path")
public String getPath() {
return path;
}

public void setPath(String path) {
this.path = path;
}

@JsonProperty("parameter")
public List<Parameter> getParameter() {
return parameter;
}

public void setParameter(List<Parameter> parameter) {
this.parameter = parameter;
}

@JsonProperty("message_type")
public String getMessageType() {
return messageType;
}

public void setMessageType(String messageType) {
this.messageType = messageType;
}

@JsonProperty("enabled_capability")
public List<String> getEnabledCapability() {
return enabledCapability;
}

public void setEnabledCapability(List<String> enabledCapability) {
this.enabledCapability = enabledCapability;
}
}
44 changes: 44 additions & 0 deletions src/main/java/org/imsglobal/lti2/objects/provider/Parameter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package org.imsglobal.lti2.objects.provider;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
* Parameter Object
*/
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class Parameter {
@JsonProperty("variable")
private String variable;
@JsonProperty("name")
private String name;
@JsonProperty("fixed")
private String fixed;

@JsonProperty("variable")
public String getVariable() {
return variable;
}

public void setVariable(String variable) {
this.variable = variable;
}

@JsonProperty("name")
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@JsonProperty("fixed")
public String getFixed() {
return fixed;
}

public void setFixed(String fixed) {
this.fixed = fixed;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package org.imsglobal.lti2.objects.provider;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.imsglobal.lti2.objects.consumer.Description;
import org.imsglobal.lti2.objects.consumer.Name;

import java.util.List;

/**
* Resource Handler Object
*/
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class ResourceHandler {
@JsonProperty("message")
private List<Message> message;
@JsonProperty("name")
private Name name;
@JsonProperty("resource_type")
private String resourceType;
@JsonProperty("description")
private Description description;

@JsonProperty("message")
public List<Message> getMessage() {
return message;
}

public void setMessage(List<Message> message) {
this.message = message;
}

@JsonProperty("name")
public Name getName() {
return name;
}

public void setName(Name name) {
this.name = name;
}

@JsonProperty("resource_type")
public String getResourceType() {
return resourceType;
}

public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}

@JsonProperty("description")
public Description getDescription() {
return description;
}

public void setDescription(Description description) {
this.description = description;
}
}
68 changes: 51 additions & 17 deletions src/main/java/org/imsglobal/lti2/objects/provider/ToolProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,54 @@
import java.util.Map;

import com.fasterxml.jackson.databind.JsonNode;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.imsglobal.lti2.objects.consumer.ProductInstance;

/**
*
* @author paul
*/
@JsonPropertyOrder({
"@context",
"@type",
"@id"
})
@com.fasterxml.jackson.annotation.JsonPropertyOrder({
"@context",
"@type",
"@id"
})
public class ToolProfile {

@org.codehaus.jackson.annotate.JsonProperty("@context")
@com.fasterxml.jackson.annotation.JsonProperty("@context")
private Object _context;
@JsonProperty("@id")
@org.codehaus.jackson.annotate.JsonProperty("@id")
private String id;
private String _id;
@org.codehaus.jackson.annotate.JsonProperty("@type")
@com.fasterxml.jackson.annotation.JsonProperty("@type")
private String _type;
private String lti_version;
private JsonNode base_url_choice;
private ProductInstance product_instance;
private JsonNode resource_handler;
private JsonNode message;
private List<ResourceHandler> resource_handler;
private List<Message> message;

public ToolProfile() {
}

public ToolProfile(String id, String lti_version, JsonNode base_url_choice, ProductInstance product_instance, JsonNode resource_handler, JsonNode message) {
this.id = id;
public ToolProfile(Object _context,String _type, String _id, String lti_version, JsonNode base_url_choice, ProductInstance product_instance, List<ResourceHandler> resource_handler, List<Message> message) {
this._context = _context;
this._type = _type;
this._id = _id;
this.lti_version = lti_version;
this.base_url_choice = base_url_choice;
this.product_instance = product_instance;
this.resource_handler = resource_handler;
this.message = message;
}

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getLti_version() {
return lti_version;
}
Expand All @@ -81,20 +92,43 @@ public void setBase_url_choice(JsonNode base_url_choice) {
this.base_url_choice = base_url_choice;
}

public JsonNode getResource_handler() {
public List<ResourceHandler> getResource_handler() {
return resource_handler;
}

public void setResource_handler(JsonNode resource_handler) {
public void setResource_handler(List<ResourceHandler> resource_handler) {
this.resource_handler = resource_handler;
}

public JsonNode getMessage() {
public String get_id() {
return _id;
}

public void set_id(String _id) {
this._id = _id;
}

public List<Message> getMessage() {
return message;
}

public void setMessage(JsonNode message) {
public void setMessage(List<Message> message) {
this.message = message;
}

public String get_type() {
return _type;
}

public void set_type(String _type) {
this._type = _type;
}

public Object get_context() {
return _context;
}

public void set_context(Object _context) {
this._context = _context;
}
}
Loading