Difference between revisions of "CopyResource class"
Line 1: | Line 1: | ||
{{CGscriptClass_Template | {{CGscriptClass_Template | ||
− | |Name=CopyResource | + | |Name=<nowiki>CopyResource</nowiki> |
− | |Description=A way to copy resources | + | |Description=<nowiki>A way to copy resources</nowiki> |
− | |Constructors= | + | |InheritsFrom=object|Constructors= |
{{CGscriptConstructors_Template|Parameters= | {{CGscriptConstructors_Template|Parameters= | ||
− | {{CGscriptParameters_Template|Type=int|Name=sourceResourceId|Description=Resource Id of the source|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=destResourceId|Description=Resource Id of the resource to copy to}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>sourceResourceId</nowiki>|Description=<nowiki>Resource Id of the source</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destResourceId</nowiki>|Description=<nowiki>Resource Id of the resource to copy to</nowiki>}} |
− | |Description=Setup the copy of child resources. Finalize copy by calling CopySourceXXX}} | + | |Description=<nowiki>Setup the copy of child resources. Finalize copy by calling CopySourceXXX</nowiki>}} |
{{CGscriptConstructors_Template|Parameters= | {{CGscriptConstructors_Template|Parameters= | ||
− | {{CGscriptParameters_Template|Type=int|Name=sourceResourceId|Description=Resource Id of the source|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=destParentResourceId|Description=Resource Id of the parent to copy to|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=destName|Description=New resource name}} | + | {{CGscriptParameters_Template|Type=int|Name=<nowiki>sourceResourceId</nowiki>|Description=<nowiki>Resource Id of the source</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>destParentResourceId</nowiki>|Description=<nowiki>Resource Id of the parent to copy to</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>destName</nowiki>|Description=<nowiki>New resource name</nowiki>}} |
− | |Description=Setup the copy. Finalize copy by calling CopyXXX}} | + | |Description=<nowiki>Setup the copy. Finalize copy by calling CopyXXX</nowiki>}} |
|Methods= | |Methods= | ||
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyBill|Description=Copy a Bill}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyBill</nowiki>|Description=<nowiki>Copy a Bill</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyDiagram|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyDiagram</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=bool|Name=copyLayout|Description=Make a copy of the layout}} | + | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyLayout</nowiki>|Description=<nowiki>Make a copy of the layout</nowiki>}} |
− | |Description=Copy a diagram}} | + | |Description=<nowiki>Copy a diagram</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyGroup|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyGroup</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=bool|Name=copyUsers|Description=Copy the users|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=copyRules|Description=Copy the group builder rules}} | + | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyUsers</nowiki>|Description=<nowiki>Copy the users</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyRules</nowiki>|Description=<nowiki>Copy the group builder rules</nowiki>}} |
− | |Description=Copy a group}} | + | |Description=<nowiki>Copy a group</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyGroupAccess|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyGroupAccess</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=bool|Name=copyResourceAccess|Description=Copy access to resources|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=copyNavigationAccess|Description=Copy access to functionality}} | + | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyResourceAccess</nowiki>|Description=<nowiki>Copy access to resources</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyNavigationAccess</nowiki>|Description=<nowiki>Copy access to functionality</nowiki>}} |
− | |Description=Copy resource or navigation access}} | + | |Description=<nowiki>Copy resource or navigation access</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyProduct|Description=Copy a product}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyProduct</nowiki>|Description=<nowiki>Copy a product</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyProject|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyProject</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=string|Name=projectCode|Description=New project code, may be empty |Comma=,}}{{CGscriptParameters_Template|Type=string|Name=clientref|Description=New clientref}} | + | {{CGscriptParameters_Template|Type=string|Name=<nowiki>projectCode</nowiki>|Description=<nowiki>New project code, may be empty </nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>clientref</nowiki>|Description=<nowiki>New clientref</nowiki>}} |
− | |Description=Copy a project}} | + | |Description=<nowiki>Copy a project</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyQuestionnaire|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyQuestionnaire</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=bool|Name=copyQuotas|Description=Copy quotas|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=copyStratifications|Description=Copy stratifications|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=copySamplerules|Description=Copy samplerules|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=sampleRuleCopyRebuild|Description=Rebuild copied sample rules|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=sampleRuleCopyExcludeSource|Description=Add a sample rule that the users should not have participated in the original questionnaire}} | + | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyQuotas</nowiki>|Description=<nowiki>Copy quotas</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyStratifications</nowiki>|Description=<nowiki>Copy stratifications</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>copySamplerules</nowiki>|Description=<nowiki>Copy samplerules</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>sampleRuleCopyRebuild</nowiki>|Description=<nowiki>Rebuild copied sample rules</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>sampleRuleCopyExcludeSource</nowiki>|Description=<nowiki>Add a sample rule that the users should not have participated in the original questionnaire</nowiki>}} |
− | |Description=Copy a Questionnaire. Always copies template}} | + | |Description=<nowiki>Copy a Questionnaire. Always copies template</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyQuestionnaireLayout|Description=Copy a QuestionnaireLayout}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyQuestionnaireLayout</nowiki>|Description=<nowiki>Copy a QuestionnaireLayout</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyQuestionnaireLayoutTemplate|Description=Copy a QuestionnaireLayoutTemplate}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyQuestionnaireLayoutTemplate</nowiki>|Description=<nowiki>Copy a QuestionnaireLayoutTemplate</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyQuestionnaireTemplate|Description=Copy a QuestionnaireTemplate}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyQuestionnaireTemplate</nowiki>|Description=<nowiki>Copy a QuestionnaireTemplate</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyReportStyleSheet|Description=Copy a ReportStyleSheet}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyReportStyleSheet</nowiki>|Description=<nowiki>Copy a ReportStyleSheet</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyReportTemplate|Description=Copy a ReportTemplate}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyReportTemplate</nowiki>|Description=<nowiki>Copy a ReportTemplate</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceAttachments|Description=Copy the source's Attachments}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceAttachments</nowiki>|Description=<nowiki>Copy the source's Attachments</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceConstantOption|Description=Copy the source's ConstantOption}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceConstantOption</nowiki>|Description=<nowiki>Copy the source's ConstantOption</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceData|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceData</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=bool|Name=copyNonSample|Description=Copy non-sample data}} | + | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyNonSample</nowiki>|Description=<nowiki>Copy non-sample data</nowiki>}} |
− | |Description=Copy the source's Data}} | + | |Description=<nowiki>Copy the source's Data</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceImages|Description=Copy the source's Images}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceImages</nowiki>|Description=<nowiki>Copy the source's Images</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceJournal|Description=Copy the source's Journal entries}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceJournal</nowiki>|Description=<nowiki>Copy the source's Journal entries</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceParameters|Description=Copy the source's Parameters}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceParameters</nowiki>|Description=<nowiki>Copy the source's Parameters</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceProductCategories|Description=Copy the source's ProductCategories}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceProductCategories</nowiki>|Description=<nowiki>Copy the source's ProductCategories</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceProductOptions|Description=Copy the source's ProductOptions}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceProductOptions</nowiki>|Description=<nowiki>Copy the source's ProductOptions</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopySourceProperties|Description=Copy the source's Properties}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopySourceProperties</nowiki>|Description=<nowiki>Copy the source's Properties</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyTask|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyTask</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=bool|Name=copySettings|Description=Copy settings}} | + | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>copySettings</nowiki>|Description=<nowiki>Copy settings</nowiki>}} |
− | |Description=Copy a Task}} | + | |Description=<nowiki>Copy a Task</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=CopyUser|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>CopyUser</nowiki>|Parameters= |
− | {{CGscriptParameters_Template|Type=bool|Name=copyNavigationAccess|Description=Copy navigation access|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=copyResourceAccess|Description=Copy resource access|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=copyMembership|Description=Copy group memberships|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=copyUserPrefs|Description=Copy user prefs}} | + | {{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyNavigationAccess</nowiki>|Description=<nowiki>Copy navigation access</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyResourceAccess</nowiki>|Description=<nowiki>Copy resource access</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyMembership</nowiki>|Description=<nowiki>Copy group memberships</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>copyUserPrefs</nowiki>|Description=<nowiki>Copy user prefs</nowiki>}} |
− | |Description=Copy a User}} | + | |Description=<nowiki>Copy a User</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | + | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}} |
|Properties= | |Properties= | ||
− | {{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} | + | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=int|Name=ResourceIdOfCopy|HasGetter=1|Description=Get the resource id of the copy after copying}} | + | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceIdOfCopy</nowiki>|HasGetter=1|Description=<nowiki>Get the resource id of the copy after copying</nowiki>}} |
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} | + | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} |
}} | }} | ||
Latest revision as of 07:42, 2 July 2020
CopyResource
A way to copy resources
Parent class
Inherits from object
Constructors
- (int sourceResourceId "Resource Id of the source", int destResourceId "Resource Id of the resource to copy to") - Setup the copy of child resources. Finalize copy by calling CopySourceXXX
- (int sourceResourceId "Resource Id of the source", int destParentResourceId "Resource Id of the parent to copy to", string destName "New resource name") - Setup the copy. Finalize copy by calling CopyXXX
Methods
- Empty CopyBill() - Copy a Bill
- Empty CopyDiagram(bool copyLayout "Make a copy of the layout") - Copy a diagram
- Empty CopyGroup(bool copyUsers "Copy the users", bool copyRules "Copy the group builder rules") - Copy a group
- Empty CopyGroupAccess(bool copyResourceAccess "Copy access to resources", bool copyNavigationAccess "Copy access to functionality") - Copy resource or navigation access
- Empty CopyProduct() - Copy a product
- Empty CopyProject(string projectCode "New project code, may be empty ", string clientref "New clientref") - Copy a project
- Empty CopyQuestionnaire(bool copyQuotas "Copy quotas", bool copyStratifications "Copy stratifications", bool copySamplerules "Copy samplerules", bool sampleRuleCopyRebuild "Rebuild copied sample rules", bool sampleRuleCopyExcludeSource "Add a sample rule that the users should not have participated in the original questionnaire") - Copy a Questionnaire. Always copies template
- Empty CopyQuestionnaireLayout() - Copy a QuestionnaireLayout
- Empty CopyQuestionnaireLayoutTemplate() - Copy a QuestionnaireLayoutTemplate
- Empty CopyQuestionnaireTemplate() - Copy a QuestionnaireTemplate
- Empty CopyReportStyleSheet() - Copy a ReportStyleSheet
- Empty CopyReportTemplate() - Copy a ReportTemplate
- Empty CopySourceAttachments() - Copy the source's Attachments
- Empty CopySourceConstantOption() - Copy the source's ConstantOption
- Empty CopySourceData(bool copyNonSample "Copy non-sample data") - Copy the source's Data
- Empty CopySourceImages() - Copy the source's Images
- Empty CopySourceJournal() - Copy the source's Journal entries
- Empty CopySourceParameters() - Copy the source's Parameters
- Empty CopySourceProductCategories() - Copy the source's ProductCategories
- Empty CopySourceProductOptions() - Copy the source's ProductOptions
- Empty CopySourceProperties() - Copy the source's Properties
- Empty CopyTask(bool copySettings "Copy settings") - Copy a Task
- Empty CopyUser(bool copyNavigationAccess "Copy navigation access", bool copyResourceAccess "Copy resource access", bool copyMembership "Copy group memberships", bool copyUserPrefs "Copy user prefs") - Copy a User
- (From object) string ToString() - The string representation of the object.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- int ResourceIdOfCopy { get; } - Get the resource id of the copy after copying
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Examples
number group_rid_from=6793;
number group_rid_to=7080;
CopyResource a=new CopyResource(6793,7080);
a.CopyGroupAccess(true,true);