268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
#
# <public>
proc useServerId { {serverId ""} } {
variable downloadUrn
variable loginUrn
variable logoutUrn
verifyServerId $serverId
if {[string length $serverId] > 0} then {
#
# NOTE: Set the URN variables to values that should cause the
# specified server Id to be used (assume the server Id
# itself is valid and active).
#
|
|
|
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
#
# <public>
proc useServerId { {serverId ""} } {
variable downloadUrn
variable loginUrn
variable logoutUrn
::PackageRepository::verifyServerId $serverId
if {[string length $serverId] > 0} then {
#
# NOTE: Set the URN variables to values that should cause the
# specified server Id to be used (assume the server Id
# itself is valid and active).
#
|
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
|
}
}
}
return ""
}
#
# NOTE: This procedure verifies that the specified value is indeed a valid
# server identifier. The serverId argument is the value to verify.
# This procedure may raise script errors.
#
# <internal>
proc verifyServerId { serverId } {
if {[string length $serverId] > 0 && \
![regexp -nocase -- {^[A-Z][0-9A-Z]*$} $serverId]} then {
error "server Id must be alphanumeric and start with a letter"
}
}
#
# NOTE: This procedure verifies that the specified value is indeed a valid
# version identifier. The versionId argument is the value to verify.
# This procedure may raise script errors.
#
# <internal>
proc verifyVersionId { versionId } {
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
790
791
792
793
794
795
796
797
798
799
800
801
802
803
|
}
}
}
return ""
}
#
# NOTE: This procedure verifies that the specified value is indeed a valid
# version identifier. The versionId argument is the value to verify.
# This procedure may raise script errors.
#
# <internal>
proc verifyVersionId { versionId } {
|