18 using erminas.SmartAPI.Utils;
20 namespace erminas.SmartAPI.CMS.Project.Publication
25 string UrlPrefix {
get; }
28 internal class PublicationTarget : PartialRedDotProjectObject, IPublicationTarget
31 private string _urlPrefix;
33 internal PublicationTarget(
IProject project, XmlElement xmlElement) : base(project, xmlElement)
38 public PublicationTarget(IProject project, Guid guid) : base(project, guid)
44 get {
return LazyLoad(ref _type); }
47 public string UrlPrefix
49 get {
return LazyLoad(ref _urlPrefix); }
52 protected override void LoadWholeObject()
57 protected override XmlElement RetrieveWholeObject()
59 const string LOAD_PUBLISHING_TARGET =
@"<EXPORT guid=""{0}"" action=""load""/>";
61 XmlDocument xmlDoc = Project.ExecuteRQL(
string.Format(LOAD_PUBLISHING_TARGET, Guid.ToRQLString()),
63 return (XmlElement) xmlDoc.GetElementsByTagName(
"EXPORT")[0];
66 private void LoadXml()
68 InitIfPresent(ref _urlPrefix,
"urlprefix", x => x);