// Call to load from the XIB/NIB file
 public CreateObjectWindowController (string objectClass, VMDirServerDTO serverDTO) : base ("CreateObjectWindow")
 {
     _objectClass = objectClass;
     _serverDTO = serverDTO;
     Bind ();
     Utilities.RemoveDontShowAttributes (_properties);
 }
Exemplo n.º 2
0
 //call checked exec on the caller of this method
 public static void  GetItemProperties (string itemName, VMDirServerDTO serverDTO, Dictionary<string,VMDirBagItem> _properties)
 {
     ILdapMessage ldMsg = null;
     try {
         List<ILdapEntry> dnEntries = serverDTO.Connection.SearchAndGetEntries (itemName, LdapScope.SCOPE_BASE, "(objectClass=*)", null, 0, ref ldMsg);
         foreach (LdapEntry entry in dnEntries) {
             string[] names = entry.getAttributeNames ().ToArray ();
             foreach (string name in names) {
                 LdapValue[] vals = entry.getAttributeValues (name).ToArray ();
                 var val = vals;
                 var key = name;
                 var attribType = serverDTO.Connection.SchemaManager.GetAttributeType (key);
                 bool readOnly = true;
                 string desc = "";
                 if (attribType != null) {
                     readOnly = attribType.ReadOnly;
                     desc = attribType.Description;
                     if (attribType != null) {
                         _properties [key] = new VMDirBagItem {
                             Value = val,
                             IsReadOnly = readOnly,
                             Description = desc,
                             IsRequired = true
                         };
                     }
                 }
             }
         }
         if (ldMsg != null)
             (ldMsg as LdapMessage).FreeMessage ();
     } catch (Exception e) {
         throw e;
     }
 }
Exemplo n.º 3
0
 public DirectoryNode (string dn, VMDirServerDTO dto, ScopeNode parent) : base (dto)
 {
     Name = dn;
     DisplayName = VMDirServerDTO.DN2CN (Name);
     Parent = parent;
     IsBaseNode = false;
     _properties = new Dictionary<string, VMDirBagItem> ();
 }
Exemplo n.º 4
0
        public static VMDirServerDTO CreateInstance()
        {
            var dto = new VMDirServerDTO {
                GUID = Guid.NewGuid().ToString()
            };

            return(dto);
        }
Exemplo n.º 5
0
        public static VMDirServerDTO CreateInstance()

        {
            var dto = new VMDirServerDTO {
                GUID = Guid.NewGuid().ToString(), _pageSize = VMDirConstants.DEFAULT_PAGE_SIZE, OperationalAttrFlag = false, OptionalAttrFlag = false, IsLoggedIn = false
            };

            return(dto);
        }
 public LdapPropertiesWindowController (String itemName, VMDirServerDTO dto) : base ("LdapPropertiesWindow")
 {
     this.itemName = itemName;
     this.serverDTO = dto;
     _properties = new Dictionary<string, VMDirBagItem> ();
     try {
         Utilities.GetItemProperties (itemName, dto, _properties);
         Utilities.RemoveDontShowAttributes (_properties);
     } catch (Exception e) {
         UIErrorHelper.ShowAlert ("", e.Message);
     }
 }
		public SuperLoggingBrowserWindowController (VMDirServerDTO serverDTO) : base ("SuperLoggingBrowserWindow")
		{
			_serverDTO = serverDTO;
		}
Exemplo n.º 8
0
 public VMDirServerInfo (VMDirServerDTO dto)
 {
     DTO = dto;
     IsLoggedIn = false;
     loginComplete = false;
 }
 public ManagePropertiesWindowController (string objectClass, IEnumerable<KeyValuePair<string,string>> existingAttributes, VMDirServerDTO serverDTO) : base ("ManagePropertiesWindow")
 {
     _objectClass = objectClass;
     _serverDTO = serverDTO;
     Bind (existingAttributes);
 }
Exemplo n.º 10
0
 public static string[]  SearchItemCN (string itemName, string searchObjectClass, string searchName, string[] attribs, VMDirServerDTO serverDTO)
 {
     ILdapMessage ldMsg = null;
     try {
         string filter = "(&(objectClass=" + searchObjectClass + ")(cn=" + searchName + "))";
         List<string> dn = new List<String> ();
         List<ILdapEntry> dnEntries = serverDTO.Connection.SearchAndGetEntries (itemName, LdapScope.SCOPE_SUBTREE, filter, attribs, 0, ref ldMsg);
         foreach (LdapEntry entry in dnEntries) {
             dn.Add (entry.getDN ());
         }
         return dn.ToArray ();
     } catch (Exception e) {
         throw e;
     }
 }
Exemplo n.º 11
0
 public ChildScopeNode (VMDirServerDTO dto)
 {
     this.ServerDTO = dto;
 }
 // Shared initialization code
 void Initialize (VMDirServerDTO dto)
 {
     _dto = dto;
 }
 // Call to load from the XIB/NIB file
 public ConnectToLdapWindowController (VMDirServerDTO dto) : base ("ConnectToLdapWindow")
 {
     Initialize (dto);
 }
 public AddGroupByCNWindowController (VMDirServerDTO dto) : base ("AddGroupByCNWindow")
 {
     serverDTO = dto;
 }
Exemplo n.º 15
0
 public  static VMDirServerDTO CreateInstance ()
 {
     var dto = new VMDirServerDTO { GUID = Guid.NewGuid ().ToString () };
     return dto;
 }
 // Call to load from the XIB/NIB file
 public SchemaBrowserWindowController (VMDirServerDTO dto) : base ("SchemaBrowserWindow")
 {
     _serverDTO = dto;
     Bind ();
 }