Exemple #1
0
        private static XmlElement CreateTemplateXmlElement(XmlDocument xmlDoc, IContentClassFolder folder)
        {
            XmlElement template = xmlDoc.AddElement("TEMPLATE");

            template.AddAttribute("action", "addnew");
            template.AddAttribute("folderguid", folder.Guid.ToRQLString());
            return(template);
        }
 public BrokenContentClassFolderSharingException(ServerLogin login, IContentClassFolder folder,
                                                 Guid sharedFromProjectGuid, Guid sharedFromFolderGuid)
     : base(login,
         string.Format(
             "Cannot load project/folder information on broken content class folder {0}. Missing project/folder: {1}/{2}",
             folder, sharedFromProjectGuid, sharedFromFolderGuid))
 {
     _sharedFromProjectGuid = sharedFromProjectGuid;
     _sharedFromFolderGuid = sharedFromFolderGuid;
 }
 public BrokenContentClassFolderSharingException(ServerLogin login, IContentClassFolder folder,
                                                 Guid sharedFromProjectGuid, Guid sharedFromFolderGuid)
     : base(
         login,
         string.Format(
             "Cannot load project/folder information on broken content class folder {0}. Missing project/folder: {1}/{2}",
             folder, sharedFromProjectGuid, sharedFromFolderGuid))
 {
     _sharedFromProjectGuid = sharedFromProjectGuid;
     _sharedFromFolderGuid  = sharedFromFolderGuid;
 }
Exemple #4
0
        private ContentClass CreateCopyInProject(IProject project, Guid targetFolderGuid)
        {
            IContentClassFolder folder = project.ContentClassFolders.GetByGuid(targetFolderGuid);

            if (folder == null)
            {
                throw new ArgumentException("no such content class folder '" + targetFolderGuid.ToRQLString() +
                                            "' in project " + Name);
            }

            var        xmlDoc   = new XmlDocument();
            XmlElement template = CreateTemplateXmlElement(xmlDoc, folder);

            AddTemplateDescriptions(project, template);

            AddTemplateVariants(template);

            //AddProjectVariants(project, template);

            return(CreateContentClass(project, template));
        }
Exemple #5
0
 private static XmlElement CreateTemplateXmlElement(XmlDocument xmlDoc, IContentClassFolder folder)
 {
     XmlElement template = xmlDoc.AddElement("TEMPLATE");
     template.AddAttribute("action", "addnew");
     template.AddAttribute("folderguid", folder.Guid.ToRQLString());
     return template;
 }