本文整理汇总了C#中ContentAPI类的典型用法代码示例。如果您正苦于以下问题:C# ContentAPI类的具体用法?C# ContentAPI怎么用?C# ContentAPI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContentAPI类属于命名空间,在下文中一共展示了ContentAPI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, System.EventArgs e)
{
m_refMsg = m_refCommon.EkMsgRef;
AppImgPath = m_refCommon.AppImgPath;
AppPath = m_refCommon.AppPath;
m_strPageAction = Request.QueryString["action"];
Utilities.SetLanguage(m_refCommon);
MenuLanguage = m_refCommon.ContentLanguage;
MenuId = Convert.ToInt64(Request.QueryString["menuid"]);
if (Request.QueryString["view"] != null)
{
m_strViewItem = Request.QueryString["view"];
}
m_refContent = m_refCommon.EkContentRef;
m_refContentApi = new ContentAPI();
Utilities.SetLanguage(m_refContentApi);
sitePath = m_refCommon.SitePath;
m_strBackPage = Request.QueryString.ToString();
// strip off refresh indicator
if (m_strBackPage.EndsWith("&rf=1"))
{
// refresh is needed after we edit a submenu, but we don't want to keep refreshing if we use the same URL
m_strBackPage = m_strBackPage.Substring(0, m_strBackPage.Length - 5);
}
DisplayPage();
}
示例2: WidgetControls_widget
protected WidgetControls_widget()
{
_contentApi = new ContentAPI();
_siteApi = new SiteAPI();
_ApplicationPath = _contentApi.ApplicationPath.TrimEnd(new char[] { '/' });
_SitePath = _contentApi.SitePath.TrimEnd(new char[] { '/' });
}
示例3: IsCurrentApprover
public bool IsCurrentApprover(long userId, long contentId)
{
ContentAPI m_refContentApi = new ContentAPI();
bool isCurrent = false;
ApprovalData[] approvaldata = null;
if (approvaldata == null)
{
approvaldata = m_refContentApi.GetCurrentApprovalInfoByID(contentId);
}
if ((approvaldata != null) && approvaldata.Length > 0)
{
bool IsLastApproval = System.Convert.ToBoolean(approvaldata[approvaldata.Length - 1].IsCurrentApprover &&
(approvaldata[approvaldata.Length - 1].UserId == m_refContentApi.UserId ||
new UserAPI().IsAGroupMember(m_refContentApi.UserId, approvaldata[approvaldata.Length - 1].GroupId)));
if (IsLastApproval)
{
isCurrent = true;
}
else
{
for (int i = 0; i <= (approvaldata.Length - 1); i++)
{
if (approvaldata[i].IsCurrentApprover)
{
isCurrent = System.Convert.ToBoolean(approvaldata[i].UserId == m_refContentApi.UserId || new UserAPI().IsAGroupMember(m_refContentApi.UserId, approvaldata[i].GroupId));
}
}
}
}
return isCurrent;
}
示例4: GetFolderPath
public string GetFolderPath(long Id)
{
ContentAPI contentAPI = new ContentAPI();
SiteAPI siteAPI = new SiteAPI();
szdavfolder = "ekdavroot";
string sitePath = (string) (siteAPI.SitePath.ToString().TrimEnd(new char[] {'/'}).TrimStart(new char[] {'/'}));
szdavfolder = (string) (szdavfolder.TrimEnd(new char[] {'/'}).TrimStart(new char[] {'/'}));
if (Page.Request.Url.Host.ToLower() == "localhost")
{
szdavfolder = Page.Request.Url.Scheme + Uri.SchemeDelimiter + System.Net.Dns.GetHostName() + "/" + sitePath + "/" + szdavfolder + "_" + siteAPI.UserId + "_" + siteAPI.UniqueId + (((Context.Request.QueryString["LangType"] != null) ? ("_" + Context.Request.QueryString["LangType"].ToString()) : "") ) + "/";
}
else
{
szdavfolder = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + sitePath + "/" + szdavfolder + "_" + siteAPI.UserId + "_" + siteAPI.UniqueId + (((Context.Request.QueryString["LangType"] != null) ? ("_" + Context.Request.QueryString["LangType"].ToString()) : "") ) + "/";
}
string szFolderPath = contentAPI.EkContentRef.GetFolderPath(Id);
szFolderPath = szFolderPath.Replace("\\", "/");
szFolderPath = szFolderPath.TrimStart(new char[] {'/'});
szFolderPath = szFolderPath.Replace("\\\\", "/");
if (szFolderPath.Length > 0)
{
szFolderPath = szdavfolder + szFolderPath + "/";
}
else
{
szFolderPath = szdavfolder;
}
return szFolderPath;
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "application/javascript";
// initialize additional variables for later use
m_refMsg = m_refSiteApi.EkMsgRef;
// instantiate contentAPI reference
ContentAPI contentApi = new ContentAPI();
// assign the resource text values as needed
jsAddPage.Text = m_refMsg.GetMessage("lbl pagebuilder add page");
jsAppPath.Text = contentApi.AppPath;
jsBack.Text = m_refMsg.GetMessage("back");
jsCancel.Text = m_refMsg.GetMessage("btn cancel");
jsFinish.Text = m_refMsg.GetMessage("btn finish");
jsNext.Text = m_refMsg.GetMessage("btn next");
jsOk.Text = m_refMsg.GetMessage("lbl ok");
jsSavePageAs.Text = m_refMsg.GetMessage("lbl pagebuilder save page");
jsWizardsPath.Text = (contentApi.AppPath + "pagebuilder/wizards/");
jsErrorPageTitle.Text = m_refMsg.GetMessage("lbl pagebuilder error page title");
jsErrorSelectLayout.Text = m_refMsg.GetMessage("lbl pagebuilder error select layout");
jsErrorUrlAlias.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias");
jsErrorUrlAliasExists.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias exists");
jsdropdownMustMatch.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias selection must match");
jsinvalidExtension.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias invalid extension");
jsselectExtension.Text = m_refMsg.GetMessage("lbl pagebuilder error url alias select extension");
jserrorMetadata.Text = m_refMsg.GetMessage("lbl pagebuilder error metadata");
jserrorTaxonomy.Text = m_refMsg.GetMessage("lbl pagebuilder error taxonomy");
jsloading.Text = m_refMsg.GetMessage("lbl sync loading");
jsAddMaster.Text = m_refMsg.GetMessage("lbl Add Master Layout");
}
示例6: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
_ContentApi = new ContentAPI();
_MessageHelper = _ContentApi.EkMsgRef;
if (Request.RawUrl.ToLower().Contains("<script"))
{
Utilities.ShowError(_MessageHelper.GetMessage("invalid querstring"));
return;
}
this.RegisterWorkareaCssLink();
this.RegisterDialogCssLink();
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekxbrowser.js", "ekxbrowserJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekutil.js", "ekutilJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../RadWindow.js", "RadWindowJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekformfields.js", "ekformfieldsJS");
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "InitializeRadWindow", "InitializeRadWindow();", true);
this.Title.Text = this.GetMessage("lbl group box");
this.RadTabStrip1.Tabs[0].Text = this.GetMessage("tab general");
this.RadTabStrip1.Tabs[0].ToolTip = this.RadTabStrip1.Tabs[0].Text + "Tab";
this.RadTabStrip1.Tabs[1].Text = this.GetMessage("tab advanced");
this.RadTabStrip1.Tabs[1].ToolTip = this.RadTabStrip1.Tabs[1].Text + "Tab";
this.RadTabStrip1.Tabs[2].Text = this.GetMessage("tab relevance");
this.RadTabStrip1.Tabs[2].ToolTip = this.RadTabStrip1.Tabs[2].Text + "Tab";
this.lblAppearance.InnerHtml = this.GetMessage("lbl appearance");
this.lblNoBorder.InnerHtml = this.GetMessage("lbl no border");
this.lblShowBorder.InnerHtml = this.GetMessage("lbl show border");
this.lblCaption.InnerHtml = this.GetMessage("lbl caption c");
this.txtCaption.Value = this.GetMessage("lbl fields");
this.sEnterCaption.Text = this.GetMessage("msg enter caption");
}
示例7: LoadBalanceManager
/// <summary>
/// Constructor
/// </summary>
/// <param name="context">Current HTTP context</param>
public LoadBalanceManager(HttpContext context)
{
_contentApi = new ContentAPI();
_siteApi = new SiteAPI();
_loadBalanceSyncManager = new LoadBalanceSynchronizationManager();
_context = context;
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
contentAPI = new ContentAPI();
siteAPI = new SiteAPI();
switch( Request.QueryString["action"])
{
case "getdavurl":
Response.Write(GetSharepointUploadPath());
break;
case "getdetails":
Response.Write(
"showRedistributionStatusCallback(\"" +
EscapeString(GetRedistributionDetails()) +
"\");cleanUp(\"" +
Request.QueryString["cleanupid"] +
"\");");
break;
default:
Response.Write(
"distributeCallback(" +
IsDocumentPromoted().ToString().ToLowerInvariant() +
");cleanUp(\"" +
Request.QueryString["cleanupid"] +
"\");");
break;
}
}
catch (Exception ex)
{
DisplayError(ex.Message);
}
}
示例9: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
_ContentApi = new ContentAPI();
_MessageHelper = _ContentApi.EkMsgRef;
if (EkFunctions.UrlDecode(Request.RawUrl).ToLower().Contains("<script") | EkFunctions.UrlDecode(Request.RawUrl).ToLower().Contains("</script"))
{
Utilities.ShowError(_MessageHelper.GetMessage("invalid querstring"));
return;
}
this.RegisterWorkareaCssLink();
this.RegisterDialogCssLink();
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronStringJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, Ektron.Cms.API.JS.ManagedScript.EktronXmlJS);
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekxbrowser.js", "ekxbrowserJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekutil.js", "ekutilJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../RadWindow.js", "RadWindowJS");
Ektron.Cms.API.JS.RegisterJSInclude(this, "../ekformfields.js", "ekformfieldsJS");
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "InitializeRadWindow", "InitializeRadWindow();", true);
this.Title.Text = this.GetMessage("lbl checkbox field");
this.RadTabStrip1.Tabs[0].Text = this.GetMessage("tab general"); ;
this.RadTabStrip1.Tabs[0].ToolTip = this.GetMessage("tab general") + " Tab"; ;
this.RadTabStrip1.Tabs[1].Text = this.GetMessage("tab validation"); ;
this.RadTabStrip1.Tabs[1].ToolTip = this.GetMessage("tab validation") + " Tab"; ;
this.RadTabStrip1.Tabs[2].Text = this.GetMessage("tab advanced"); ;
this.RadTabStrip1.Tabs[2].ToolTip = this.GetMessage("tab advanced") + " Tab"; ;
this.lblDefVal.InnerHtml = this.GetMessage("lbl default value");
this.lblDefValT.InnerHtml = this.GetMessage("lbl def val true");
this.lblDefValF.InnerHtml = this.GetMessage("lbl def val false");
this.lblCaption.InnerHtml = this.GetMessage("lbl caption c");
}
示例10: Workarea_MenuActions
public Workarea_MenuActions()
{
m_CommonApi = new CommonApi();
m_ContentApi = new ContentAPI();
m_EkContent = m_ContentApi.EkContentRef;
m_refMsg = m_ContentApi.EkMsgRef;
}
示例11: CatalogEntry_PageFunctions_Js
protected CatalogEntry_PageFunctions_Js()
{
_ContentApi = new ContentAPI();
_MessageHelper = _ContentApi.EkMsgRef;
_JsLibrary = new workareajavascript();
_ApplicationPath = _ContentApi.ApplicationPath.TrimEnd(new char[] { '/' });
}
示例12: Page_Init
protected void Page_Init(object sender, EventArgs e)
{
var m_refMsg = new ContentAPI().EkMsgRef;
BackLabel.Text = m_refMsg.GetMessage("btn back");
DeleteLabel.Text = m_refMsg.GetMessage("btn delete");
//Register CSS
Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaCss);
Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaIeCss);
Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronFixedPositionToolbarCss);
Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronJFunctJS);
ltrlStyleSheetJS.Text = _styleHelper.GetClientScript();
_msgHelper = new EkMessageHelper(_contentApi.RequestInformationRef);
Utilities.ValidateUserLogin();
if (_contentApi.RequestInformationRef.IsMembershipUser == 1 || !_contentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminPersonalize)) {
Response.Redirect(_contentApi.ApplicationPath + "reterror.aspx?info=" + _contentApi.EkMsgRef.GetMessage("msg login cms user"), true);
return;
}
BindToolbars();
this.image_link_100.Attributes.Add("onclick", string.Format("return validateList('{0}');", _msgHelper.GetMessage("select target content")));
}
示例13: IsAdvancedWorkflowActive
public static bool IsAdvancedWorkflowActive(long contentId, long folderId, int languageId)
{
var contentApi = new ContentAPI();
var cwfutilties = new ContentWorkflowUtilities(contentApi.RequestInformationRef);
var workflowdefinitionid = cwfutilties.GetInheritedWorkflowDefinitionId(contentId, folderId, languageId);
return (workflowdefinitionid > 0);
}
示例14: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
contentAPI = new ContentAPI();
string action = string.Empty;
Utilities.ValidateUserLogin();
RegisterResources();
try
{
if (!contentAPI.IsAdmin())
{
Response.Redirect(contentAPI.ApplicationPath + "reterror.aspx?info=" + contentAPI.EkMsgRef.GetMessage("msg login cms administrator"), true);
return;
}
if (!string.IsNullOrEmpty(Request.QueryString["action"]))
{
action = Request.QueryString["action"].ToString();
}
switch (action.ToLower())
{
case "viewalldeviceconfigurations":
ViewAllDeviceConfigurations m_vd;
m_vd = (ViewAllDeviceConfigurations)(LoadControl("controls/DeviceConfiguration/ViewAllDeviceConfigurations.ascx"));
m_vd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_vd);
break;
case "adddeviceconfiguration":
case "editdeviceconfiguration":
AddEditDeviceConfiguration m_ad;
m_ad = (AddEditDeviceConfiguration)(LoadControl("controls/DeviceConfiguration/AddEditDeviceConfiguration.ascx"));
m_ad.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_ad);
break;
case "viewdeviceconfiguration":
ViewDeviceConfiguration m_vsd;
m_vsd = (ViewDeviceConfiguration)(LoadControl("controls/DeviceConfiguration/ViewDeviceConfiguration.ascx"));
m_vsd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_vsd);
break;
case "reorderdeviceconfigurations":
ReorderDeviceConfigurations m_rd;
m_rd = (ReorderDeviceConfigurations)(LoadControl("controls/DeviceConfiguration/ReorderDeviceConfigurations.ascx"));
m_rd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_rd);
break;
case "deletedeviceconfiguration":
DeleteDeviceConfiguration m_dd;
m_dd = (DeleteDeviceConfiguration)(LoadControl("controls/DeviceConfiguration/DeleteDeviceConfiguration.ascx"));
m_dd.ID = "deviceConfiguration";
DataHolder.Controls.Add(m_dd);
break;
}
}
catch (Exception ex)
{
Utilities.ShowError(ex.InnerException.ToString());
}
}
示例15: Attributes
protected Attributes()
{
_contentApi = new ContentAPI();
_siteApi = new SiteAPI();
_MessageHelper = _contentApi.EkMsgRef;
this.SitePath = _contentApi.SitePath.TrimEnd(new char[] { '/' });
this.ApplicationPath = _siteApi.ApplicationPath.TrimEnd(new char[] { '/' });
}