|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.tmatesoft.svn.core.wc2.SvnOperation<T>
org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SVNPropertyData>
org.tmatesoft.svn.core.wc2.SvnSetProperty
public class SvnSetProperty
Represents set property operation.
Sets propertyName to propertyValue on target
or
sets propertyName to propertyValue on
revision in the repository represented by target.
A propertyValue of null will
delete the property.
propertyName is an svn-controlled property (i.e. prefixed
with "svn:"), then the caller is
responsible for ensuring that the value is UTF8-encoded and uses LF
line-endings.
Target should represent working copy path.
If depth is SVNDepth.EMPTY,
set the property on target only; if SVNDepth.FILES,
set it on target and its file children (if any); if
SVNDepth.IMMEDIATES, on target and all of its
immediate children (both files and directories); if
SVNDepth.INFINITY, on target and everything beneath
it.
changeLists is a collection of String
changelist names, used as a restrictive filter on items whose properties
are set; that is, don't set properties on any item unless it's a member
of one of those changelists. If changelists is empty (or
null), no changelist filtering occurs.
*
SvnOperation.run() methods operates only on working copies and does not open any network
connection.
This method throws SVNException if one of the following is true:
target does not exist
SVNErrorCode.CLIENT_PROPERTY_NAME error code - if
changed property name is a revision property name or not a
valid property name or not a regular property name (one
starting with a "svn:entry"
or "svn:wc" prefix)
Target can be either URL or working copy path.
If target is working copy path, repository URL is obtained from this.
Revision must be set.
The authentication
manager, either provided by a caller or a default one, will be used for
authentication.
Although this routine accepts a working copy path it doesn't affect the
working copy at all; it's a pure network operation that changes an
*unversioned* property attached to a revision. This can be used to tweak
log messages, dates, authors, and the like. Be careful: it's a lossy
operation.
Also note that unless the administrator creates a pre-revprop-change hook
in the repository, this feature will fail.
SvnOperation.run() return SVNPropertyData information of the property
This method throws SVNException if one of the following is true:
SVNErrorCode.CLIENT_PROPERTY_NAME
error code - if propertyName is invalid
| Constructor Summary | |
|---|---|
protected |
SvnSetProperty(SvnOperationFactory factory)
|
| Method Summary | |
|---|---|
protected void |
ensureArgumentsAreValid()
|
java.lang.String |
getPropertyName()
Returns property name. |
SVNPropertyValue |
getPropertyValue()
Returns property value. |
ISvnPropertyValueProvider |
getPropertyValueProvider()
Returns property value provider callback |
boolean |
isChangesWorkingCopy()
Gets whether the operation changes working copy |
boolean |
isForce()
Sets whether to skip validity checking. |
boolean |
isRevisionProperty()
Gets whether it is revision property. |
void |
setForce(boolean force)
Sets whether to skip validity checking. |
void |
setPropertyName(java.lang.String propertyName)
Sets property name |
void |
setPropertyValue(SVNPropertyValue propertyValue)
Sets property value |
void |
setPropertyValueProvider(ISvnPropertyValueProvider propertyValueProvider)
Sets property value provider callback |
void |
setRevisionProperty(boolean revisionProperty)
Sets whether it is revision property. |
| Methods inherited from class org.tmatesoft.svn.core.wc2.SvnReceivingOperation |
|---|
first, getReceiver, initDefaults, last, receive, run, setReceiver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SvnSetProperty(SvnOperationFactory factory)
| Method Detail |
|---|
public boolean isForce()
true if validity checking should not be done, otherwise falsesetForce(boolean)public void setForce(boolean force)
target's property:
If force is true, no validity checking is done.
But if force is false, and propertyName is not a
valid property for target, SVNException is thrown, either with
an error code SVNErrorCode.ILLEGAL_TARGET
(if the property is not appropriate for target), or with
SVNErrorCode.BAD_MIME_TYPE (if
propertyName is "svn:mime-type",
but propertyValue is not a valid mime-type).
force is true new lines in the author property are allowed.
public SVNPropertyValue getPropertyValue()
public void setPropertyValue(SVNPropertyValue propertyValue)
propertyValue - value of the propertypublic void setPropertyValueProvider(ISvnPropertyValueProvider propertyValueProvider)
propertyValueProvider - callback that will be called to get property values to setpublic ISvnPropertyValueProvider getPropertyValueProvider()
public java.lang.String getPropertyName()
public void setPropertyName(java.lang.String propertyName)
propertyName - name of the property
protected void ensureArgumentsAreValid()
throws SVNException
ensureArgumentsAreValid in class SvnOperation<SVNPropertyData>SVNExceptionpublic void setRevisionProperty(boolean revisionProperty)
revisionProperty - true if it is revision property, true if it is target's propertypublic boolean isRevisionProperty()
true if it is revision property, true if it is target's propertypublic boolean isChangesWorkingCopy()
isChangesWorkingCopy in class SvnOperation<SVNPropertyData>true if the operation changes the working copy, otherwise false
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||