Exported AuthenticationService via RMI. Insecure for now but we can switch over

to using SSL when needed.  Restructured exports of AVM specific apis to authenticate
remotely and pass the ticket with each remote service call.  These required some changes
to jndi-client and even to the web-client which uses the AVM remote interface within
the Alfresco server.  Oh, the point of this is that since I'm writing some CLTs, I might
as well do them correctly; we'll need the option of security sooner rather than later.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4489 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-12-02 00:54:41 +00:00
parent e932d2ec41
commit b209f4c073
19 changed files with 1790 additions and 171 deletions

View File

@@ -0,0 +1,73 @@
/**
*
*/
package org.alfresco.repo.avm.clt;
import java.util.List;
import org.alfresco.service.cmr.avmsync.AVMDifference;
import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.cmr.avmsync.AVMSyncServiceTransport;
import org.alfresco.service.cmr.security.AuthenticationService;
/**
* Client side wrapper around the RMI based AVMSyncServiceTransport.
* @author britt
*/
public class AVMSyncServiceClient implements AVMSyncService
{
/**
* The instance of AVMSyncServiceTransport.
*/
private AVMSyncServiceTransport fTransport;
/**
* Default constructor.
*/
public AVMSyncServiceClient()
{
}
/**
* Set the transport for the service.
*/
public void setAvmSyncServiceTransport(AVMSyncServiceTransport transport)
{
fTransport = transport;
}
/* (non-Javadoc)
* @see org.alfresco.service.cmr.avmsync.AVMSyncService#compare(int, java.lang.String, int, java.lang.String)
*/
public List<AVMDifference> compare(int srcVersion, String srcPath,
int dstVersion, String dstPath)
{
return fTransport.compare(ClientTicketHolder.GetTicket(), srcVersion, srcPath, dstVersion, dstPath);
}
/* (non-Javadoc)
* @see org.alfresco.service.cmr.avmsync.AVMSyncService#flatten(java.lang.String, java.lang.String)
*/
public void flatten(String layerPath, String underlyingPath)
{
fTransport.flatten(ClientTicketHolder.GetTicket(), layerPath, underlyingPath);
}
/* (non-Javadoc)
* @see org.alfresco.service.cmr.avmsync.AVMSyncService#resetLayer(java.lang.String)
*/
public void resetLayer(String layerPath)
{
fTransport.resetLayer(ClientTicketHolder.GetTicket(), layerPath);
}
/* (non-Javadoc)
* @see org.alfresco.service.cmr.avmsync.AVMSyncService#update(java.util.List, boolean, boolean, boolean, boolean, java.lang.String, java.lang.String)
*/
public void update(List<AVMDifference> diffList, boolean ignoreConflicts,
boolean ignoreOlder, boolean overrideConflicts,
boolean overrideOlder, String tag, String description)
{
fTransport.update(ClientTicketHolder.GetTicket(), diffList, ignoreConflicts, ignoreOlder, overrideConflicts, overrideOlder, tag, description);
}
}