Skip to content

Commit

Permalink
- Added changes made to accept profile uploads. Not tested.
Browse files Browse the repository at this point in the history
- Changed Boolean type to native boolean in NodeStatus to be consistent.
  • Loading branch information
abrougher committed Oct 31, 2012
1 parent a696be7 commit 3424645
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
Expand Up @@ -7,17 +7,17 @@ public class NodeStatus {
/**
* Is the node is registered with another node.
*/
Boolean registered;
boolean registered;

/**
* Is the node a registration server.
*/
Boolean registrationServer;
boolean registrationServer;

/**
* Is the node initially loaded.
*/
Boolean isInitialLoaded;
boolean isInitialLoaded;

/**
* The node's ID.
Expand Down Expand Up @@ -80,44 +80,44 @@ public class NodeStatus {
private String symmetricVersion = Version.version();

/**
* @return Boolean indicating if the node is registered with another node.
* @return boolean indicating if the node is registered with another node.
*/
public Boolean getRegistered() {
public boolean getRegistered() {
return registered;
}

/**
* @param registered Boolean indicating if the node is registered with another node.
* @param registered boolean indicating if the node is registered with another node.
*/
public void setRegistered(Boolean registered) {
public void setRegistered(boolean registered) {
this.registered = registered;
}

/**
* @return Boolean indicating if the node is a registration server.
* @return boolean indicating if the node is a registration server.
*/
public Boolean getRegistrationServer() {
public boolean getRegistrationServer() {
return registrationServer;
}

/**
* @param registrationServer Boolean indicating if the node is a registration server.
* @param registrationServer boolean indicating if the node is a registration server.
*/
public void setRegistrationServer(Boolean registrationServer) {
public void setRegistrationServer(boolean registrationServer) {
this.registrationServer = registrationServer;
}

/**
* @return Boolean indicating if the node is initial loaded.
* @return boolean indicating if the node is initial loaded.
*/
public Boolean getIsInitialLoaded() {
public boolean getIsInitialLoaded() {
return isInitialLoaded;
}

/**
* @param isInitialLoaded Boolean indicating if the node is initial loaded.
* @param isInitialLoaded boolean indicating if the node is initial loaded.
*/
public void setIsInitialLoaded(Boolean isInitialLoaded) {
public void setIsInitialLoaded(boolean isInitialLoaded) {
this.isInitialLoaded = isInitialLoaded;
}

Expand Down
Expand Up @@ -12,7 +12,9 @@
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

@Controller
public class RestService {
Expand Down Expand Up @@ -44,16 +46,16 @@ public final String identity(@PathVariable("engine") String engineName) {
public final Set<String> engines() {
return getSymmetricEngineHolder().getEngines().keySet();
}


/**
* Loads a profile for the specified engine on the node.
* @param engineName
*/
@RequestMapping(value = "/loadprofile/engines/{engine}", method = RequestMethod.PUT)
@ResponseBody
@RequestMapping(value = "/loadprofile/engines/{engine}", method = RequestMethod.POST)
@ResponseBody
//TODO: figure out how we will pass the file info...
public final void loadProfile(@PathVariable("engine") String engineName) {
//TODO: Implementation
public final void loadProfile(@PathVariable("engine") String engineName, @RequestParam MultipartFile file) {
System.out.println("File '" + file.getOriginalFilename() + "' uploaded successfully");
}

/**
Expand Down

0 comments on commit 3424645

Please sign in to comment.