Ejemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="ifc">Content interface object</param>
 /// <param name="findInfo">Find info object</param>
 /// <param name="sordZ">Element selector</param>
 public FWFindSordsCache(FWContentInterface ifc, FindInfo findInfo, SordZ sordZ)
     : base(ifc.Conn.Ix, findInfo)
 {
     this.ifc            = ifc;
     this.sordZVal       = new SordZ(sordZ != null ? sordZ.bset : 0L);
     this.sordZVal.bset |= SordC.mbMinMembers;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="ifc">Content interface object</param>
 /// <param name="dv">Internal document version object</param>
 /// <param name="sord">Sord object</param>
 /// <param name="type">Version type</param>
 public FWDocVersion(FWContentInterface ifc, DocVersion dv, FWSord sord, FWDocVersionType type)
     : base(ifc)
 {
     this.typeVal = type;
     this.dvVal   = dv;
     this.sord    = sord;
     updateInternalData(false);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor. Normally, the constructor is called from FWConnFactory.
        /// </summary>
        /// <param name="innerConn">Inner connection</param>
        public FWConnection(IXConnection innerConn)
        {
            internalConnection     = innerConn;
            contentInterfaceVal    = new Content.FWContentInterface();
            sessionInterfaceVal    = new Session.FWSessionInterface(this, internalConnection.ConnProperties);
            workflowInterfaceVal   = new Workflow.FWWorkflowInterface(this, internalConnection.ConnProperties);
            masterDataInterfaceVal = new MasterData.FWMasterDataInterface(this, internalConnection.ConnProperties);

            arcSord = internalConnection.Ix.checkoutSord("1", EditInfoC.mbSordLean, LockC.NO).sord;
            contentInterfaceVal.Init(this, arcSord.name, internalConnection.ConnProperties);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Create a DownloadManger object for the given content interface.
        /// </summary>
        /// <param name="ifc">Content interface object</param>
        /// <param name="workDir">Working directory, documents are downloaded into this directory.</param>
        /// <param name="lifetimeSeconds">Lifetime seconds for cached document files</param>
        public FWDownloadManager(FWContentInterface ifc, String workDir, int lifetimeSeconds) : base(ifc)
        {
            this.workDir         = workDir;
            this.lifetimeSeconds = lifetimeSeconds;
            mapOfForbiddenChars  = new Dictionary <char, char>();
            for (int i = 0; i < FORBIDDEN_FILESYSTEM_CHARS.Length; i++)
            {
                mapOfForbiddenChars.Add(FORBIDDEN_FILESYSTEM_CHARS[i], '_');
            }

            controledFilesAttributes = new Dictionary <string, FileAttributes>();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="ifc">Content interface object</param>
 /// <param name="dvs">DocVersion objects from IndexServer API</param>
 /// <param name="sord">Sord object from IndexServer API</param>
 /// <param name="type">Type of versions</param>
 public FWDocVersions(FWContentInterface ifc, DocVersion[] dvs, FWSord sord, FWDocVersionType type)
     : base(ifc)
 {
     this.docs = new List <FWDocVersion>(dvs != null ? dvs.Length : 0);
     if (dvs != null)
     {
         foreach (DocVersion v in dvs)
         {
             InternalAdd(v);
         }
     }
     this.typeVal = type;
     this.sord    = sord;
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Create a DownloadManger object for the given content interface.
        /// </summary>
        /// <param name="ifc">Content interface object</param>
        /// <param name="workDir">Working directory, documents are downloaded into this directory.</param>
        /// <param name="lifetimeSeconds">Lifetime seconds for cached document files</param>
        /// <param name="initFWatcherForMonitoringCheckOutDir">
        /// If True Filesystemwachter will be initialized for monitoring of changes in directory for checked out documents otherwise false.
        /// By initialization of Filesystemwatcher event CheckOutDirectoryEntriesChanged can be issued otherwise not.
        /// </param>
        public FWDownloadManager(FWContentInterface ifc, String workDir, int lifetimeSeconds, bool initFWatcherForMonitoringCheckOutDir)
            : base(ifc)
        {
            this.workDir         = workDir;
            this.lifetimeSeconds = lifetimeSeconds;
            mapOfForbiddenChars  = new Dictionary <char, char>();
            for (int i = 0; i < FORBIDDEN_FILESYSTEM_CHARS.Length; i++)
            {
                mapOfForbiddenChars.Add(FORBIDDEN_FILESYSTEM_CHARS[i], '_');
            }

            // Initialize filesystemwatcher for monitoring of changes in directory for checked out documents
            if (initFWatcherForMonitoringCheckOutDir)
            {
                controledFilesAttributes = new Dictionary <string, FileAttributes>();
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="checkOutDir">Path to directory with checked out documents.</param>
        public FWCheckedOutDocumentsManager(FWContentInterface contentInterface, string checkOutDir) : base(contentInterface)
        {
            bool existsCheckOutDir = (!string.IsNullOrEmpty(checkOutDir) && Directory.Exists(checkOutDir));

            if (!existsCheckOutDir)
            {
                throw new InvalidOperationException("Initialization of manager for checked out documents was not possible. Checkout directory was not found or does not exists.");
            }
            else
            {
                this.checkOutDir = checkOutDir;
            }

            replacementCharsForForbiddenChars = new Dictionary <char, char>();
            for (int i = 0; i < FORBIDDEN_FILESYSTEM_CHARS.Length; i++)
            {
                replacementCharsForForbiddenChars.Add(FORBIDDEN_FILESYSTEM_CHARS[i], '_');
            }

            // Initialize filesystemwatcher for monitoring of changes in directory for checked out documents
            InitializeFileSystemWatcherForMonintoringCheckOutDir(checkOutDir);
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="ifc">Content interface object.</param>
 /// <param name="parentFolder">The children of this folder are cached.</param>
 /// <param name="inclFolders">True, if child folders have to be included.</param>
 /// <param name="inclDocs">True, if child documents have to be included.</param>
 /// <remarks>
 /// If <c>inclFolders</c> and <c>inclDocs</c> are set to false, no restiction is made.
 /// </remarks>
 public FWFindChildrenCache(FWContentInterface ifc, FWFolder parentFolder,
                            bool inclFolders, bool inclDocs)
     : base(ifc, makeFindInfo(parentFolder, inclFolders, inclDocs), FWFindSordsCache <T> .DEFAULT_SORDZ)
 {
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="ifc">Interface object of this package</param>
 public FWContentBase(FWContentInterface ifc)
 {
     this.ifc = ifc;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="ifc">Content interface object</param>
 /// <param name="sord">Sord object from IndexServer API</param>
 public FWSord(FWContentInterface ifc, Sord sord)
     : base(ifc)
 {
     Init(sord);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="ifc">Content interface object</param>
 /// <param name="sord">Sord object from IndexServer API</param>
 public FWFolder(FWContentInterface ifc, Sord sord) : base(ifc, sord)
 {
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="ifc">Content interface object</param>
 /// <param name="sord">Raw Sord object from IndexServer API</param>
 public FWDocument(FWContentInterface ifc, Sord sord)
     : base(ifc, sord)
 {
     Init();
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Constructor
 /// </summary>
 public FWContentClassFactory(FWContentInterface ifc)
 {
     this.ifc = ifc;
 }