@Test public void testGetAccount() { final String userName = "root"; SolarisEntry result = SolarisEntries.getAccount(userName, EnumSet.of(NativeAttribute.AUTHS, NativeAttribute.PROFILES, NativeAttribute.NAME), getConnection()); assertTrue(result.getName().equals(userName)); Set<Attribute> set = result.getAttributeSet(); assertNotNull(set); boolean isAuths = false; boolean isProfiles = false; for (Attribute attribute : set) { if (!isAuths) { isAuths = NativeAttribute.AUTHS.getName().equals(attribute.getName()); } if (!isProfiles) { isProfiles = NativeAttribute.PROFILES.getName().equals(attribute.getName()); } if (isAuths && isProfiles) { break; } } if (!getConnection().isNis()) { assertTrue(isAuths); assertTrue(isProfiles); } }
public static SolarisEntry getAccount(String name, Set<NativeAttribute> attrsToGet, SolarisConnection conn) { AccountIterator it = new AccountIterator(CollectionUtil.newList(name), attrsToGet, conn); return (it != null && it.hasNext()) ? it.next() : null; }
SolarisEntries { public static SolarisEntry getAccount(String name, Set<NativeAttribute> attrsToGet, SolarisConnection conn) { AccountIterator it = new AccountIterator(CollectionUtil.newList(name), attrsToGet, conn); return (it != null && it.hasNext()) ? it.next() : null; } }
SolarisEntries { public static SolarisEntry getAccount(String name, Set<NativeAttribute> attrsToGet, SolarisConnection conn) { AccountIterator it = new AccountIterator(CollectionUtil.newList(name), attrsToGet, conn); return (it != null && it.hasNext()) ? it.next() : null; } private  SolarisEntries(); }
SolarisEntries { public static SolarisEntry getAccount(String name, Set<NativeAttribute> attrsToGet, SolarisConnection conn) { AccountIterator it = new AccountIterator(CollectionUtil.newList(name), attrsToGet, conn); return (it != null && it.hasNext()) ? it.next() : null; } private  SolarisEntries(); static Iterator<SolarisEntry> getAllAccounts(Set<NativeAttribute> attrsToGet,
            SolarisConnection conn); static Iterator<SolarisEntry> getAllGroups(Set<NativeAttribute> attrsToGet,
            SolarisConnection conn); static SolarisEntry getAccount(String name, Set<NativeAttribute> attrsToGet,
            SolarisConnection conn); static SolarisEntry getGroup(String groupName, Set<NativeAttribute> attrsToGet,
            SolarisConnection conn); }
SolarisEntries { public static SolarisEntry getAccount(String name, Set<NativeAttribute> attrsToGet, SolarisConnection conn) { AccountIterator it = new AccountIterator(CollectionUtil.newList(name), attrsToGet, conn); return (it != null && it.hasNext()) ? it.next() : null; } private  SolarisEntries(); static Iterator<SolarisEntry> getAllAccounts(Set<NativeAttribute> attrsToGet,
            SolarisConnection conn); static Iterator<SolarisEntry> getAllGroups(Set<NativeAttribute> attrsToGet,
            SolarisConnection conn); static SolarisEntry getAccount(String name, Set<NativeAttribute> attrsToGet,
            SolarisConnection conn); static SolarisEntry getGroup(String groupName, Set<NativeAttribute> attrsToGet,
            SolarisConnection conn);  }