removed tabs
git-svn-id: svn://anubis/gvsu@273 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
4a892b98b7
commit
78dfaf2a8e
@ -342,10 +342,10 @@ public class ChatClient
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PresenceService pServ = new PresenceServiceImpl();
|
PresenceService pServ = new PresenceServiceImpl();
|
||||||
|
|
||||||
ChatClient chatClient = new ChatClient(pServ, user);
|
ChatClient chatClient = new ChatClient(pServ, user);
|
||||||
chatClient.run();
|
chatClient.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void usage()
|
private static void usage()
|
||||||
|
@ -13,9 +13,9 @@ import edu.gvsu.cis.cs656.lab4.server.RegistrationInfo;
|
|||||||
|
|
||||||
public class PresenceServiceImpl implements PresenceService
|
public class PresenceServiceImpl implements PresenceService
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a client with the presence service.
|
* Register a client with the presence service.
|
||||||
|
@ -24,44 +24,44 @@ import org.restlet.resource.Variant;
|
|||||||
public class UserResource extends Resource
|
public class UserResource extends Resource
|
||||||
{
|
{
|
||||||
|
|
||||||
public UserResource(Context context, Request request, Response response)
|
public UserResource(Context context, Request request, Response response)
|
||||||
{
|
{
|
||||||
super(context, request, response);
|
super(context, request, response);
|
||||||
String id = (String) request.getAttributes().get("id");
|
String id = (String) request.getAttributes().get("id");
|
||||||
getVariants().add(new Variant(MediaType.TEXT_XML));
|
getVariants().add(new Variant(MediaType.TEXT_XML));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handle HTTP GET requests.
|
* handle HTTP GET requests.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Representation getRepresentation(Variant variant)
|
public Representation getRepresentation(Variant variant)
|
||||||
{
|
{
|
||||||
DomRepresentation rep = null;
|
DomRepresentation rep = null;
|
||||||
if (variant.getMediaType().equals(MediaType.TEXT_XML))
|
if (variant.getMediaType().equals(MediaType.TEXT_XML))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
rep = new DomRepresentation(MediaType.TEXT_XML);
|
rep = new DomRepresentation(MediaType.TEXT_XML);
|
||||||
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
|
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
|
||||||
rep.getDocument().normalizeDocument();
|
rep.getDocument().normalizeDocument();
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rep;
|
return rep;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean allowDelete()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete()
|
public boolean allowDelete()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
if (this.book != null)
|
if (this.book != null)
|
||||||
@ -73,22 +73,22 @@ public class UserResource extends Resource
|
|||||||
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
|
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PUT is implemented.
|
* PUT is implemented.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean allowPut()
|
public boolean allowPut()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update a resource in response to an HTTP PUT call.
|
* Update a resource in response to an HTTP PUT call.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void put(Representation entity)
|
public void put(Representation entity)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user