Name
global.SystemCloneWrapper
Description
Provides access to Global artifacts for scoped application Quebec version onwards.
Script
var SystemCloneWrapper = Class.create();
SystemCloneWrapper.prototype = {
initialize: function() {
},
type: 'SystemCloneWrapper'
};
SystemCloneWrapper.getCloneServerURL = function() {
var serverUrl = gs.getProperty('glide.db.clone.instance_clone_server');
if(!gs.nil(serverUrl))
return serverUrl.substring(0, serverUrl.lastIndexOf('/') + 1);
return '';
};
SystemCloneWrapper.isCloneAllowed = function() {
var instanceName = SncCloneUtils.getSourceInstanceName();
var isLocalHost = gs.getProperty("glide.servlet.uri").indexOf('localhost') > -1;
var isDeveloper = GlideUtil.isDeveloperInstance();
var isProduction = GlideUtil.isProductionInstance();
var subprodRegEx = /.+(dev|test(ing)?|sandbox|qa|stage|staging|uat|pov)([0-9])*$/i;
var isSubprod = subprodRegEx.test(instanceName) || !isProduction;
// allow dev and sub-prods to be cloned over;
// production, demo, training should not be allowed to be cloned over by default
if (isDeveloper || isLocalHost || isSubprod)
return true;
else
return false;
};
SystemCloneWrapper.getServerPassword = function () {
return gs.getProperty('glide.customurl.datacenter.instance.password', null);
};
Sys ID
c28662550f0310106fa0d6b335767e8a