1 14 package org.jahia.security.accounts; 15 16 import java.util.Vector ; 17 18 import org.jahia.exceptions.database.JahiaDatabaseException; 19 20 26 public class AccountList extends Vector 27 { 28 32 public AccountList () { 33 super(); 34 } 35 36 37 58 public static AccountList getAccountsList (String siteKey) 59 throws JahiaDatabaseException 60 { 61 AccountList list = new AccountList (); 62 if (siteKey == null) { 63 return list; 64 } 65 66 AccountDBUtils dbUtils = AccountDBUtils.getInstance(); 67 if (dbUtils != null) { 68 list = dbUtils.getAccountsList (siteKey, -1); 69 } 70 71 return list; 72 } 73 74 75 96 static public AccountList getEnabledAccountsList (String siteKey) 97 throws JahiaDatabaseException 98 { 99 AccountList list = new AccountList (); 100 if (siteKey == null) { 101 return list; 102 } 103 104 AccountDBUtils dbUtils = AccountDBUtils.getInstance(); 105 if (dbUtils != null) { 106 list = dbUtils.getAccountsList (siteKey, 1); 107 } 108 109 return list; 110 } 111 112 113 133 static public AccountList getDisabledAccountsList (String siteKey) 134 throws JahiaDatabaseException 135 { 136 AccountList list = new AccountList (); 137 if (siteKey == null) { 138 return list; 139 } 140 141 AccountDBUtils dbUtils = AccountDBUtils.getInstance(); 142 if (dbUtils != null) { 143 list = dbUtils.getAccountsList (siteKey, 0); 144 } 145 146 return list; 147 } 148 149 150 164 static public AccountList getUserAccounts (String userKey) 165 throws JahiaDatabaseException 166 { 167 AccountList list = new AccountList (); 168 if (userKey != null) { 169 AccountDBUtils dbUtils = AccountDBUtils.getInstance(); 170 if (dbUtils != null) { 171 list = dbUtils.getUserAccounts (userKey); 172 } 173 } 174 return list; 175 } 176 } 177 178 | Popular Tags |