Package tigase.http.modules.rest
Class ApiKeyRepository
- java.lang.Object
-
- tigase.db.comp.ConfigRepository<Item>
-
- tigase.db.comp.UserRepoRepository<ApiKeyItem>
-
- tigase.http.modules.rest.ApiKeyRepository
-
- All Implemented Interfaces:
Iterable<ApiKeyItem>,tigase.db.comp.ComponentRepository<ApiKeyItem>,tigase.db.Repository,tigase.kernel.beans.Initializable,tigase.kernel.beans.UnregisterAware
@Bean(name="repository", parent=AbstractModule.class, active=true) @ConfigType({DefaultMode,SessionManagerMode,ConnectionManagersMode,ComponentMode}) public class ApiKeyRepository extends tigase.db.comp.UserRepoRepository<ApiKeyItem>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApiKeyRepository.ItemsChangedEvent
-
Field Summary
Fields Modifier and Type Field Description static StringAPI_KEYS_KEY
-
Constructor Summary
Constructors Constructor Description ApiKeyRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddItem(ApiKeyItem item)voidbeforeUnregister()voiddestroy()StringgetConfigKey()String[]getDefaultPropetyItems()ApiKeyItemgetItemInstance()StringgetItemsListPKey()StringgetPropertyKey()tigase.xmpp.jid.BareJIDgetRepoUser()voidinitialize()voidinitRepository(String resource_uri, Map<String,String> params)Deprecated.booleanisAllowed(String key, String domain, String path)voiditemsChanged(ApiKeyRepository.ItemsChangedEvent itemsChanged)voidremoveItem(String key)voidsetRepo(tigase.db.UserRepository userRepository)voidsetRepoUser(tigase.xmpp.jid.BareJID repoUserJid)-
Methods inherited from class tigase.db.comp.ConfigRepository
addItemNoStore, addRepoChangeListener, allItems, contains, getDefaultItems, getDefaults, getItem, getItemsOld, initItemsMap, isInitialized, itemChanged, iterator, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setAutoReloadInterval, setItemsOld, setProperties, size, toString, validateItem
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
API_KEYS_KEY
public static final String API_KEYS_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRepoUser
public tigase.xmpp.jid.BareJID getRepoUser()
- Specified by:
getRepoUserin classtigase.db.comp.UserRepoRepository<ApiKeyItem>
-
setRepoUser
public void setRepoUser(tigase.xmpp.jid.BareJID repoUserJid)
-
getConfigKey
public String getConfigKey()
- Specified by:
getConfigKeyin classtigase.db.comp.ConfigRepository<ApiKeyItem>
-
getDefaultPropetyItems
public String[] getDefaultPropetyItems()
- Overrides:
getDefaultPropetyItemsin classtigase.db.comp.ConfigRepository<ApiKeyItem>
-
getItemsListPKey
public String getItemsListPKey()
- Overrides:
getItemsListPKeyin classtigase.db.comp.UserRepoRepository<ApiKeyItem>
-
getPropertyKey
public String getPropertyKey()
- Specified by:
getPropertyKeyin classtigase.db.comp.ConfigRepository<ApiKeyItem>
-
getItemInstance
public ApiKeyItem getItemInstance()
-
setRepo
public void setRepo(tigase.db.UserRepository userRepository)
- Overrides:
setRepoin classtigase.db.comp.UserRepoRepository<ApiKeyItem>
-
destroy
public void destroy()
-
initRepository
@Deprecated public void initRepository(String resource_uri, Map<String,String> params) throws tigase.db.DBInitException
Deprecated.- Throws:
tigase.db.DBInitException
-
initialize
public void initialize()
- Specified by:
initializein interfacetigase.kernel.beans.Initializable- Overrides:
initializein classtigase.db.comp.ConfigRepository<ApiKeyItem>
-
beforeUnregister
public void beforeUnregister()
- Specified by:
beforeUnregisterin interfacetigase.kernel.beans.UnregisterAware- Overrides:
beforeUnregisterin classtigase.db.comp.ConfigRepository<ApiKeyItem>
-
addItem
public void addItem(ApiKeyItem item)
- Specified by:
addItemin interfacetigase.db.comp.ComponentRepository<ApiKeyItem>- Overrides:
addItemin classtigase.db.comp.ConfigRepository<ApiKeyItem>
-
removeItem
public void removeItem(String key)
- Specified by:
removeItemin interfacetigase.db.comp.ComponentRepository<ApiKeyItem>- Overrides:
removeItemin classtigase.db.comp.ConfigRepository<ApiKeyItem>
-
itemsChanged
@HandleEvent public void itemsChanged(ApiKeyRepository.ItemsChangedEvent itemsChanged)
-
-