Package org.tmatesoft.svn.core.wc2
Class SvnRemoteSetProperty
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<T>
-
- org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SVNCommitInfo>
-
- org.tmatesoft.svn.core.wc2.AbstractSvnCommit
-
- org.tmatesoft.svn.core.wc2.SvnRemoteSetProperty
-
- All Implemented Interfaces:
ISvnObjectReceiver<SVNCommitInfo>,ISvnOperationOptionsProvider
public class SvnRemoteSetProperty extends AbstractSvnCommit
SetspropertyNametopropertyValueon eachtargets. IfpropertyValueisnull, operation will delete the property. Targets should represent URLs.baseRevisionmust not be null; in this case, the property will only be set if it has not changed sincebaseRevision. Theauthentication managerandcommit handler, either provided by a caller or default ones, will be used to immediately attempt to commit the property change in the repository.SvnOperation.run()returnsSVNCommitInfocommit information if the commit succeeds. This method throws SVNException if the following is true:urldoes not exist inbaseRevision- exception with
SVNErrorCode.CLIENT_PROPERTY_NAMEerror code - ifpropertyNameis a revision property name or not a valid property name or not a regular property name (one starting with an "svn:entry" or"svn:wc"prefix) -
exception with
SVNErrorCode.UNSUPPORTED_FEATUREerror code - ifpropertyNameis either equal toSVNProperty.EOL_STYLEorSVNProperty.KEYWORDSorSVNProperty.CHARSET
- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSvnRemoteSetProperty(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidensureArgumentsAreValid()SVNRevisiongetBaseRevision()Returns operation's revision to change properties againstSVNPropertyValuegetOriginalPropertyValue()Returns property's original value, it was set by callerjava.lang.StringgetPropertyName()Gets name of the property.ISvnObjectReceiver<SVNPropertyData>getPropertyReceiver()Returns operation's property receiver.SVNPropertyValuegetPropertyValue()Returns the property's value.booleanisChangesWorkingCopy()Gets whether the operation changes working copybooleanisForce()Returns whether to skip validity checking ofpropertyNameandpropertyValue.voidsetBaseRevision(SVNRevision baseRevision)Sets operation's revision to change properties againstvoidsetForce(boolean force)Sets whether to skip validity checking ofpropertyNameandpropertyValue.voidsetOriginalPropertyValue(SVNPropertyValue originalPropertyValue)Sets property's original value to hold this information for the callervoidsetPropertyName(java.lang.String propertyName)Sets name of the property.voidsetPropertyReceiver(ISvnObjectReceiver<SVNPropertyData> propertyReceiver)Sets operation's property receiver.voidsetPropertyValue(SVNPropertyValue propertyValue)Sets the property's value.-
Methods inherited from class org.tmatesoft.svn.core.wc2.AbstractSvnCommit
getCommitHandler, getCommitMessage, getRevisionProperties, setCommitHandler, setCommitMessage, setRevisionProperties, setRevisionProperty
-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnReceivingOperation
first, getReceiver, initDefaults, last, receive, run, setReceiver
-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnRemoteSetProperty
protected SvnRemoteSetProperty(SvnOperationFactory factory)
-
-
Method Detail
-
isForce
public boolean isForce()
Returns whether to skip validity checking ofpropertyNameandpropertyValue.- Returns:
- force
trueif validity checking should be skipped, otherwisefalse - See Also:
setForce(boolean)
-
setForce
public void setForce(boolean force)
Sets whether to skip validity checking ofpropertyNameandpropertyValue. Ifforceistrue, this operation does no validity checking. But ifforceisfalse, andpropertyNameis not a valid property fortargets, it throws an exception, either with an error codeSVNErrorCode.ILLEGAL_TARGET(if the property is not appropriate for target), or withSVNErrorCode.BAD_MIME_TYPE(ifpropertyNameis"svn:mime-type", butpropertyValueis not a valid mime-type).- Parameters:
force-trueif validity checking should be skipped, otherwisefalse
-
getPropertyName
public java.lang.String getPropertyName()
Gets name of the property.- Returns:
- name of the property
- See Also:
setPropertyName(String)
-
setPropertyName
public void setPropertyName(java.lang.String propertyName)
Sets name of the property. IfpropertyNameis an svn-controlled property (i.e. prefixed with "svn:"), then the caller is responsible for ensuring that the value uses LF line-endings.
-
getPropertyValue
public SVNPropertyValue getPropertyValue()
Returns the property's value. IfpropertyValueisnull, operation will delete the property.- Returns:
- value of the property
-
setPropertyValue
public void setPropertyValue(SVNPropertyValue propertyValue)
Sets the property's value. IfpropertyValueisnull, operation will delete the property.- Parameters:
propertyValue- value of the property
-
getBaseRevision
public SVNRevision getBaseRevision()
Returns operation's revision to change properties against- Returns:
- base revision of the operation
-
setBaseRevision
public void setBaseRevision(SVNRevision baseRevision)
Sets operation's revision to change properties against- Parameters:
baseRevision- base revision of the operation
-
getPropertyReceiver
public ISvnObjectReceiver<SVNPropertyData> getPropertyReceiver()
Returns operation's property receiver.- Returns:
- property receiver of the operation
-
setPropertyReceiver
public void setPropertyReceiver(ISvnObjectReceiver<SVNPropertyData> propertyReceiver)
Sets operation's property receiver.- Parameters:
propertyReceiver- property receiver of the operation
-
getOriginalPropertyValue
public SVNPropertyValue getOriginalPropertyValue()
Returns property's original value, it was set by caller- Returns:
- original value of the property
-
setOriginalPropertyValue
public void setOriginalPropertyValue(SVNPropertyValue originalPropertyValue)
Sets property's original value to hold this information for the caller- Parameters:
originalPropertyValue- original value of the property
-
ensureArgumentsAreValid
protected void ensureArgumentsAreValid() throws SVNException- Overrides:
ensureArgumentsAreValidin classSvnOperation<SVNCommitInfo>- Throws:
SVNException
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<SVNCommitInfo>- Returns:
trueif the operation changes the working copy, otherwisefalse
-
-