FileSite Workspace as a Webpage

Hi,

The SDK 8.5 Release Notes mention some new functionality (page 8) stating that FileSite now supports showing a webpage when you navigate to a workspace node. For more details it refers you to the WorkSite Desktop Interface Customization Guide.

I have looked through the customization guide but cannot find any reference to this function. I have found and implemented a test ICommand that returns a context item IManExt.ReturnedNRTURL, however this only seems to work in DeskSite. Has anyone any guidance on the FileSite functionality and how to implement it so clicking on a Workspace shows a webpage in the Outlook window?

Thanks

Comments

  • Did you ever manage to get this done ? I'm trying to do same and stuggling to find the information i need.
  • Hi,

    I did get some input from Autonomy, I have provided the code exactly as they did below. I still did not manage to get the code to work without Outlook continually crashing, perhaps you will have more luck, I'd be interested to know if you do? We are currently running FileSite 8.5 SP2 Update 6 and Office 2010. There are also some posts on the Autonomy Customer Forums, see these links:

    https://worksitesupport.interwoven.com/forums/showthread.php?t=846

    https://worksitesupport.interwoven.com/forums/showthread.php?t=394


    #define DEBUG

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using IManage;
    using IMANEXTLib;

    namespace Test_iCommand
    {
    public class Class1 : ICommand
    {
    [DllImport("user32.dll")]
    static extern short GetKeyState(int nVirtKey);

    private long mAccelerator;
    private long mBitmap;
    public IMANEXTLib.IContextItems mContext;
    private string mHelpFile;
    private string mHelpID;
    private string mHelpText;
    private string mMenuText = "elog";
    private string mName;
    private long mOptions;
    private IMANEXTLib.CommandStatus mStatus;
    private IMANEXTLib.ICommands mSubCommands;
    private string mTitle;
    private IMANEXTLib.CommandType mType;
    private const int tempVirtKey = 65536;
    private const int tempNoInvert = 131072;
    private const int tempShift = 262144;
    private const int tempControl = 524288;
    private const int tempAlt = 1048576;
    int i = 0;

    public void Execute()
    {
    lauchDebugger();
    i++; Debug.WriteLine(i + "############################################");
    IMANEXTLib.IContextItems myContext;

    myContext = mContext;

    IManage.IManObject imanObj = myContext.Item("DestinationObject");
    if (imanObj.ObjectType.SupportsType(IManage.imObjectType.imTypeWorkspace))
    {
    IManage.IManWorkspace oFol = (IManage.IManWorkspace)imanObj;
    processFolder(myContext, oFol);
    }
    else if (imanObj.ObjectType.SupportsType(IManage.imObjectType.imTypeFolderShortcut))
    {
    IManage.IManFolderShortcut oShort = (IManage.IManFolderShortcut)imanObj;
    IManage.IManFolder oFol = oShort.Resolve();
    processFolder(myContext, oFol);
    }
    else
    {
    try
    {
    object obj2 = myContext.Item("IManExt.Refresh");
    if (obj2 != null) { Context.Remove("IManExt.Refresh"); }
    }
    catch (Exception) { }
    try
    {
    object obj3 = myContext.Item("IManExt.ReturnedNRTURL");
    if (obj3 != null) { Context.Remove("IManExt.ReturnedNRTURL"); }
    }
    catch (Exception) { }

    }

    mContext = myContext;

    Debug.WriteLine("");
    }


    ///
    /// Process an iManFolder and set the correct URL in the return Context Items.
    ///
    ///
    ///
    private static void processFolder(IMANEXTLib.IContextItems myContext, IManage.IManFolder oFol)
    {
    if (oFol != null && oFol.Workspace != null)
    {
    IManage.IManCustomAttribute oClient = oFol.Workspace.GetAttributeByID(IManage.imProfileAttributeID.imProfileCustom1);
    IManage.IManCustomAttribute oMatter = oFol.Workspace.GetAttributeByID(IManage.imProfileAttributeID.imProfileCustom2);
    string strMatter="", strClient = "";
    if (oClient != null) { strClient = oClient.Name; }
    if (oMatter != null) { strMatter = oMatter.Name; }
    if (oClient != null || oMatter != null)
    {
    Debug.WriteLine(oClient.Name);
    var a = new string[] { string.Format("http://apps.intranet/elog/?client={0}&matter={1}", strClient, strMatter) };
    var b = true;
    myContext.Add("IManExt.ReturnedNRTURL", a);
    myContext.Add("IManExt.Refresh", b);
    }
    }
    }

    public void Initialize(IMANEXTLib.ContextItems Context)
    {
    lauchDebugger();
    mContext = Context;

    Name = "elog plugin";
    Title = "elog plugin";
    Accelerator = 92 + tempVirtKey + tempControl;
    Type = IMANEXTLib.CommandType.nrStandardCommand;
    Status = (int)IMANEXTLib.CommandStatus.nrGrayedCommand;
    MenuText = "elog plugin";
    HelpText = "elog plugin";

    }

    public void Update()
    {
    lauchDebugger();
    Debug.WriteLine("Update");
    if (Context != null) { Debug.WriteLine(Context.Count); }
    }

    ///
    /// Launch Debugger if shift is held and DEBUG is defined.
    ///
    private void lauchDebugger()
    {
    #if DEBUG
    int ks = GetKeyState(0x10);
    if (System.Diagnostics.Debugger.IsAttached == false && (ks & 0x80) != 0)
    {
    System.Diagnostics.Debugger.Launch();
    }
    #endif
    }

    public int Accelerator
    {
    get { return (int)mAccelerator; }
    set { mAccelerator = value; }
    }

    public object Bitmap
    {
    get { return mBitmap; }
    set { mBitmap = (long)value; }
    }

    public string MenuText
    {
    get { return mMenuText; }
    set { mMenuText = value; }
    }

    public string Name
    {
    get { return mName; }
    set { mName = value; }
    }

    public int Options
    {
    get { return (int)mOptions; }
    set { mOptions = (long)value; }
    }

    public int Status
    {
    get { return (int)mStatus; }
    set { mStatus = (IMANEXTLib.CommandStatus)value; }
    }

    public IMANEXTLib.Commands SubCommands
    {
    get { return (IMANEXTLib.Commands)mSubCommands; }
    set { mSubCommands = value; }
    }

    public string Title
    {
    get { return mTitle; }
    set { mTitle = value; }
    }

    public IMANEXTLib.CommandType Type
    {
    get { return mType; }
    set { mType = value; }
    }

    public IMANEXTLib.ContextItems Context
    {
    get { return (IMANEXTLib.ContextItems)mContext; }
    }

    public string HelpFile
    {
    get { return mHelpFile; }
    set { mHelpFile = value; }
    }

    public int HelpID
    {
    get { return int.Parse(mHelpID); }
    set { mHelpID = value.ToString(); }
    }

    public string HelpText
    {
    get { return mHelpText; }
    set { mHelpText = value; }
    }

    }

    }
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs