Added protected method AbstractContentAccessor.setContentUrl

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20003 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-04-27 10:39:57 +00:00
parent bfe6034e5c
commit 9a7df0ed38

View File

@@ -37,6 +37,7 @@ import org.alfresco.service.cmr.repository.ContentAccessor;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.ContentIOException;
import org.alfresco.service.cmr.repository.ContentStreamListener;
import org.alfresco.util.ParameterCheck;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.aop.AfterReturningAdvice;
@@ -73,6 +74,7 @@ public abstract class AbstractContentAccessor implements ContentAccessor
*/
protected AbstractContentAccessor(String contentUrl)
{
ParameterCheck.mandatoryString("contentUrl", contentUrl);
if (contentUrl == null || contentUrl.length() == 0)
{
throw new IllegalArgumentException("contentUrl is invalid:" + contentUrl);
@@ -149,6 +151,18 @@ public abstract class AbstractContentAccessor implements ContentAccessor
return contentUrl;
}
/**
* Allow derived implementations to set the Content URL. This allows for implementations
* where the URL is not known when the accessor is first constructed.
*
* @param contentUrl the new content URL
*/
protected void setContentUrl(String contentUrl)
{
ParameterCheck.mandatoryString("contentUrl", contentUrl);
this.contentUrl = contentUrl;
}
public String getMimetype()
{
return mimetype;