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.run();
|
||||
ChatClient chatClient = new ChatClient(pServ, user);
|
||||
chatClient.run();
|
||||
}
|
||||
|
||||
private static void usage()
|
||||
|
@ -13,9 +13,9 @@ import edu.gvsu.cis.cs656.lab4.server.RegistrationInfo;
|
||||
|
||||
public class PresenceServiceImpl implements PresenceService
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a client with the presence service.
|
||||
|
@ -24,44 +24,44 @@ import org.restlet.resource.Variant;
|
||||
public class UserResource extends Resource
|
||||
{
|
||||
|
||||
public UserResource(Context context, Request request, Response response)
|
||||
{
|
||||
super(context, request, response);
|
||||
public UserResource(Context context, Request request, Response response)
|
||||
{
|
||||
super(context, request, response);
|
||||
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.
|
||||
*/
|
||||
@Override
|
||||
public Representation getRepresentation(Variant variant)
|
||||
{
|
||||
DomRepresentation rep = null;
|
||||
if (variant.getMediaType().equals(MediaType.TEXT_XML))
|
||||
{
|
||||
try
|
||||
{
|
||||
/**
|
||||
* handle HTTP GET requests.
|
||||
*/
|
||||
@Override
|
||||
public Representation getRepresentation(Variant variant)
|
||||
{
|
||||
DomRepresentation rep = null;
|
||||
if (variant.getMediaType().equals(MediaType.TEXT_XML))
|
||||
{
|
||||
try
|
||||
{
|
||||
rep = new DomRepresentation(MediaType.TEXT_XML);
|
||||
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
|
||||
rep.getDocument().normalizeDocument();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return rep;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowDelete()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
rep.getDocument().normalizeDocument();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return rep;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete()
|
||||
public boolean allowDelete()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete()
|
||||
{
|
||||
/*
|
||||
if (this.book != null)
|
||||
@ -73,22 +73,22 @@ public class UserResource extends Resource
|
||||
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT is implemented.
|
||||
*/
|
||||
@Override
|
||||
public boolean allowPut()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean allowPut()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a resource in response to an HTTP PUT call.
|
||||
*/
|
||||
@Override
|
||||
public void put(Representation entity)
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Update a resource in response to an HTTP PUT call.
|
||||
*/
|
||||
@Override
|
||||
public void put(Representation entity)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user