mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUACAMOLE-38: REST class only needs directory, not entire userContext object.
This commit is contained in:
@@ -114,7 +114,7 @@ public class QuickConnectUserContext extends AbstractUserContext {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getResource() throws GuacamoleException {
|
public Object getResource() throws GuacamoleException {
|
||||||
return new QuickConnectREST(this);
|
return new QuickConnectREST(connectionDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -26,7 +26,6 @@ import javax.ws.rs.Produces;
|
|||||||
import javax.ws.rs.core.MediaType;
|
import javax.ws.rs.core.MediaType;
|
||||||
import org.apache.guacamole.GuacamoleException;
|
import org.apache.guacamole.GuacamoleException;
|
||||||
import org.apache.guacamole.auth.quickconnect.QuickConnectDirectory;
|
import org.apache.guacamole.auth.quickconnect.QuickConnectDirectory;
|
||||||
import org.apache.guacamole.auth.quickconnect.QuickConnectUserContext;
|
|
||||||
import org.apache.guacamole.auth.quickconnect.utility.QCParser;
|
import org.apache.guacamole.auth.quickconnect.utility.QCParser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,26 +40,20 @@ public class QuickConnectREST {
|
|||||||
*/
|
*/
|
||||||
private QuickConnectDirectory directory;
|
private QuickConnectDirectory directory;
|
||||||
|
|
||||||
/**
|
|
||||||
* The UserContext object for this REST endpoint.
|
|
||||||
*/
|
|
||||||
private QuickConnectUserContext userContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new QuickConnectREST class, taking in the UserContext
|
* Construct a new QuickConnectREST class, taking in the UserContext
|
||||||
* object that calls this constructor.
|
* object that calls this constructor.
|
||||||
*
|
*
|
||||||
* @param userContext
|
* @param directory
|
||||||
* The UserContext object associated with this REST endpoint
|
* The ConnectionDirectory object associated with this REST endpoint
|
||||||
*
|
*
|
||||||
* @throws GuacamoleException
|
* @throws GuacamoleException
|
||||||
* If the UserContext is unavailable or the directory object
|
* If the UserContext is unavailable or the directory object
|
||||||
* cannot be retrieved.
|
* cannot be retrieved.
|
||||||
*/
|
*/
|
||||||
public QuickConnectREST(QuickConnectUserContext userContext)
|
public QuickConnectREST(QuickConnectDirectory directory)
|
||||||
throws GuacamoleException {
|
throws GuacamoleException {
|
||||||
this.userContext = userContext;
|
this.directory = directory;
|
||||||
this.directory = this.userContext.getConnectionDirectory();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user