Merged V2.0 to HEAD

5456: (From WCM_DEPLOY)

There were many pure conflicts on license headers, one conflict due to CR-LF and
some other smaller issues to resolve:
-----------------------------------------
Resolved (line endings not cr-lf):
   root\projects\repository\config\alfresco\public-services-context.xml

Reverted:
   root\projects\web-client\source\web\images\icons\ajax_anim.gif

Reverted or Resolved (License text conflicts):
   svn revert root\projects\jndi-client\source\java\org\alfresco\jndi\JndiTest.java
   svn resolved root\projects\jndi-client\source\java\org\alfresco\jndi\AVMFileDirContext.java
   svn revert root\projects\jndi-client\source\java\org\alfresco\jndi\AVMBulkLoader.java
   svn revert root\projects\jndi-client\source\java\org\alfresco\filter\CacheControlFilter.java
   svn revert root\projects\jndi-client\source\java\org\alfresco\filter\CacheControlFilterInfoBean.java
   svn revert -R root\projects\catalina-virtual\source\java\org\alfresco\mbeans
   svn revert root\projects\catalina-virtual\source\java\org\alfresco\catalina\context\AVMStandardContext.java
   svn revert root\projects\catalina-virtual\source\java\org\alfresco\catalina\loader\AVMWebappClassLoader.java
   svn revert root\projects\catalina-virtual\source\java\org\alfresco\catalina\loader\AVMWebappLoader.java
   svn revert root\projects\catalina-virtual\source\java\org\alfresco\catalina\host\AVMResourceBinding.java
   svn resolved root\projects\catalina-virtual\source\java\org\alfresco\catalina\host\AVMHostConfig.java
      - why the change in method naming convention?
   svn resolved root\projects\catalina-virtual\source\java\org\alfresco\catalina\host\AVMHost.java
   svn revert root\projects\catalina-virtual\source\java\org\alfresco\catalina\host\DefaultAVMResourceBinding.java
   svn revert root\projects\catalina-virtual\source\java\org\alfresco\catalina\valve\AVMUrlValveTest.java
   svn resolved root\projects\catalina-virtual\source\java\org\alfresco\catalina\valve\AVMUrlValve.java
   svn revert root\projects\catalina-virtual\source\java\org\alfresco\catalina\host\AVMHostMatch.java

Modified:
   root\projects\web-client\source\java\org\alfresco\web\ui\wcm\component\UIDeployWebsite.java (Kevin to check line 330)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5484 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-04-12 01:41:14 +00:00
parent ad80d96da3
commit 138d1780cb
47 changed files with 1885 additions and 148 deletions

View File

@@ -124,6 +124,11 @@ public class AVMNodeDescriptor implements Serializable
*/
private int fDeletedType;
/**
* The GUID for the node.
*/
private String fGuid;
/**
* Make one up.
* @param path The looked up path.
@@ -136,6 +141,7 @@ public class AVMNodeDescriptor implements Serializable
* @param accessDate The access date.
* @param id The object id.
* @param versionID The version id.
* @param guid The GUID.
* @param indirection The indirection.
* @param isPrimary Whether this is a primary indirection.
* @param layerID The layer id.
@@ -152,6 +158,7 @@ public class AVMNodeDescriptor implements Serializable
long modDate,
long accessDate,
long id,
String guid,
int versionID,
String indirection,
boolean isPrimary,
@@ -170,6 +177,7 @@ public class AVMNodeDescriptor implements Serializable
fModDate = modDate;
fAccessDate = accessDate;
fID = id;
fGuid = guid;
fVersionID = versionID;
fIndirection = indirection;
fIsPrimary = isPrimary;
@@ -485,4 +493,12 @@ public class AVMNodeDescriptor implements Serializable
(fDeletedType == AVMNodeType.LAYERED_FILE ||
fDeletedType == AVMNodeType.PLAIN_FILE);
}
/**
* Get the GUID for the node.
*/
public String getGuid()
{
return fGuid;
}
}

View File

@@ -1209,4 +1209,12 @@ public interface AVMService
* @throws AVMNotFoundException
*/
public void revert(String path, AVMNodeDescriptor toRevertTo);
/**
* Set the GUID on a node. The GUID of a node uniquely identifies
* the state of a node, i.e. its content, metadata, and aspects.
* @param path The path to the node.
* @param guid The GUID to set.
*/
public void setGuid(String path, String guid);
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.alfresco.service.cmr.avm.deploy;
/**
* Callback interface for deployments.
* @author britt
*/
public interface DeploymentCallback
{
/**
* Called each time something happens during deployment.
* This is called synchronously by the deployer and should
* therefore be handled rapidly, if possible.
* @param event The event that occurred.
*/
public void eventOccurred(DeploymentEvent event);
}

View File

@@ -0,0 +1,100 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.alfresco.service.cmr.avm.deploy;
import java.io.Serializable;
import org.alfresco.util.Pair;
/**
* Interface for Deployment Events.
* @author britt
*/
public class DeploymentEvent implements Serializable
{
private static final long serialVersionUID = 2696116904379321786L;
/**
* The type of the event.
* @author britt
*/
public static enum Type implements Serializable
{
COPIED, // Copied a source node that did not exist on the destination.
UPDATED, // Overwrote the destination.
DELETED, // Deleted the destination node.
START, // A Deployment has begun.
END // A Deployment has ended.
};
private Type fType;
private Pair<Integer, String> fSource;
private String fDestination;
public DeploymentEvent(Type type, Pair<Integer, String> source, String destination)
{
fType = type;
fSource = source;
fDestination = destination;
}
/**
* Get the type of the event.
* @return The type.
*/
public Type getType()
{
return fType;
}
/**
* Get the source node version and path.
* @return
*/
public Pair<Integer, String> getSource()
{
return fSource;
}
/**
* Get the destination path.
* @return
*/
public String getDestination()
{
return fDestination;
}
/**
* Get a String representation.
*/
public String toString()
{
return fType + ": " + fSource + " -> " + fDestination;
}
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing
*/
package org.alfresco.service.cmr.avm.deploy;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* A value class that contains the results of a deployment run.
* @author britt
*/
public class DeploymentReport implements Serializable, Iterable<DeploymentEvent>
{
private static final long serialVersionUID = 5528250199836250533L;
private List<DeploymentEvent> fEvents;
public DeploymentReport()
{
fEvents = new ArrayList<DeploymentEvent>();
}
/**
* Get a String representation.
*/
public String toString()
{
StringBuilder builder = new StringBuilder();
for (DeploymentEvent event : fEvents)
{
builder.append(event.toString());
builder.append('\n');
}
return builder.toString();
}
/**
* Add an event.
* @param event
*/
public void add(DeploymentEvent event)
{
fEvents.add(event);
}
/* (non-Javadoc)
* @see java.lang.Iterable#iterator()
*/
public Iterator<DeploymentEvent> iterator()
{
return fEvents.iterator();
}
}

View File

@@ -0,0 +1,58 @@
/**
*
*/
package org.alfresco.service.cmr.avm.deploy;
/**
* A service to handle AVM repository to remote AVM repository deployment.
* @author britt
*/
public interface DeploymentService
{
/**
* Deploys the differences between what is is the local source path
* and a destination machine's path.
* @param version The local version.
* @param srcPath The local path.
* @param hostName The remote hostname.
* @param port The remote rmi registry port.
* @param userName The username for authentication.
* @param password The password for authentication.
* @param dstPath The destination path corresponding to source path.
* @param createDst Flag for whether a missing destination should be created.
* @param dontDelete Don't delete assets at the destination.
* @param dontDo If this is set then this is a dry run.
* @param callback A possibly null callback.
*/
public DeploymentReport deployDifference(int version, String srcPath,
String hostName, int port,
String userName, String password,
String dstPath,
boolean createDst,
boolean dontDelete,
boolean dontDo,
DeploymentCallback callback);
/**
* Deploy to a filesystem on another machine.
* @param version The version to deploy from.
* @param srcPath The path to deploy from.
* @param hostName The hostname of the filesystem receiver.
* @param port The port to connect to.
* @param userName The username for authentication
* @param password The password for authentication
* @param dstPath The destination path.
* @param createDst Flag for whether a missing destination should be created.
* @param dontDelete Don't delete deleted nodes from destination.
* @param dontDo If this is set, this is a dry run.
* @param callback A possibly null callback.
*/
public DeploymentReport deployDifferenceFS(int version, String srcPath,
String hostName, int port,
String userName, String password,
String dstPath,
boolean createDst,
boolean dontDelete,
boolean dontDo,
DeploymentCallback callback);
}