Exemplo n.º 1
0
 public ExternalTerm(bool systemTerm, Business.ExternalInterfaceConfig eic, ManagedItem managedItem, Template template, bool isFilter)
     : base(systemTerm, template, isFilter)
 {
     TermType = TermType.External;
     NameRequired = true;
     Name = eic.Name;
     _interfaceConfig = eic;
     //NOTE - This operation is valid only the FIRST time this is set...
     if (TermTransforms == null && _interfaceConfig.TransformTermType.HasValue)
     {
         TransformTermType = _interfaceConfig.TransformTermType;
         TermTransforms = _interfaceConfig.TermTransforms;
     }
     _managedItem = managedItem;
     _valuesLoaded = false;
     _value = null;
 }
		public ExternalInterfaceListItem(ExternalInterfaceConfig interfaceConfig)
		{
			//TODO: probably will change this
			_interfaceConfig = interfaceConfig;
			_fieldValues = new Dictionary<string, string>();
		}
 public ExternalInterfaceConfig Copy()
 {
     ExternalInterfaceConfig iConfig = new ExternalInterfaceConfig();
     iConfig._name = _name;
     iConfig._webServiceURL = _webServiceURL;
     iConfig._availableFields = new List<ExternalInterfaceAvailableField>(_availableFields);
     iConfig._searchableFields = new List<ExternalInterfaceSearchableField>(_searchableFields);
     iConfig._selectionMode = _selectionMode;
     iConfig._displayFormat = _displayFormat;
     return iConfig;
 }
Exemplo n.º 4
0
		internal static WebControl CreateExternalTermSearchControl(ExternalInterfaceConfig eic)
		{
			Label lbl = new Label();
			lbl.Width = Unit.Percentage(100.0);
			lbl.Text = string.Format("Search control for external interface '{0}' goes here.", eic.Name);
			return lbl;
		}
Exemplo n.º 5
0
        public ExternalTerm(XmlNode termNode, ManagedItem managedItem, Template template, bool isFilter)
            : base(termNode, template, isFilter)
        {
            TermType = TermType.External;
            NameRequired = true;

            XmlNode nodeInterfaceConfig = termNode.SelectSingleNode(XMLNames._E_Config);
            if (nodeInterfaceConfig == null)
                throw new Exception("Config node not found for External Term");
            _interfaceConfig = new ExternalInterfaceConfig(nodeInterfaceConfig);
            _managedItem = managedItem;
            _valuesLoaded = false;
            XmlNode nodeValue = termNode.SelectSingleNode(XMLNames._E_Value);
            if (nodeValue != null)
                _value = Utility.XMLHelper.GetXMLText(Utility.XMLHelper.GetText(nodeValue));
            else
                _value = MakeNameValueXml();
        }
Exemplo n.º 6
0
 public override void Migrate(Term term)
 {
     if (term == null)
         base.Migrate(term);
     if (!(term is ExternalTerm))
         return;
     else
     {
         ExternalTerm sourceTerm = term as ExternalTerm;
         _managedItem = sourceTerm._managedItem; //This is okay since we only need the ManagedItemID
         _value = sourceTerm._value;
         _interfaceConfig = sourceTerm._interfaceConfig.Copy();
         SaveValues(false);
         LoadValues();
         term.Runtime.Migrated = true;
     }
     Runtime.Migrated = true;
 }
Exemplo n.º 7
0
 public void RefreshInterfaceConfig(ITATSystem system)
 {
     _interfaceConfig = system.FindExternalInterfaceConfig(_interfaceConfig.Name);
 }