com.atlassian.crowd.trusted
Class PropertyBasedTrustedApplicationStore

java.lang.Object
  extended by com.atlassian.crowd.trusted.PropertyBasedTrustedApplicationStore
All Implemented Interfaces:
TrustedApplicationStore

@Transactional
public class PropertyBasedTrustedApplicationStore
extends Object
implements TrustedApplicationStore

Implementation of TrustedApplicationStore using PropertyManager.

Since:
v2.7

Constructor Summary
PropertyBasedTrustedApplicationStore(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, PropertyManager propertyManager)
           
 
Method Summary
 void addTrustedApplication(com.atlassian.security.auth.trustedapps.TrustedApplication app)
          Store the current TrustedApplication.
 boolean deleteApplication(String id)
          Delete the TrustedApplication with the given ID.
 InternalCurrentApplication getCurrentApplication()
          Gets the current application.
 com.atlassian.security.auth.trustedapps.TrustedApplication getTrustedApplication(String id)
          Fetch the TrustedApplication with the given ID.
 Iterable<com.atlassian.security.auth.trustedapps.TrustedApplication> getTrustedApplications()
          Return all the currently stored Trusted Applications.
 void storeCurrentApplication(InternalCurrentApplication currentApplication)
          Store the given current application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyBasedTrustedApplicationStore

public PropertyBasedTrustedApplicationStore(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider,
                                            PropertyManager propertyManager)
Method Detail

getTrustedApplications

public Iterable<com.atlassian.security.auth.trustedapps.TrustedApplication> getTrustedApplications()
Description copied from interface: TrustedApplicationStore
Return all the currently stored Trusted Applications.

Specified by:
getTrustedApplications in interface TrustedApplicationStore
Returns:
a collection of TrustedApplications (potentially empty).

deleteApplication

public boolean deleteApplication(String id)
Description copied from interface: TrustedApplicationStore
Delete the TrustedApplication with the given ID.

Specified by:
deleteApplication in interface TrustedApplicationStore
Parameters:
id - the ID of the application to delete.
Returns:
true if the application was deleted.

addTrustedApplication

public void addTrustedApplication(com.atlassian.security.auth.trustedapps.TrustedApplication app)
Description copied from interface: TrustedApplicationStore
Store the current TrustedApplication. If the application already exists, update it.

Specified by:
addTrustedApplication in interface TrustedApplicationStore
Parameters:
app - the TrustedApplication to store.

getTrustedApplication

public com.atlassian.security.auth.trustedapps.TrustedApplication getTrustedApplication(String id)
Description copied from interface: TrustedApplicationStore
Fetch the TrustedApplication with the given ID.

Specified by:
getTrustedApplication in interface TrustedApplicationStore
Parameters:
id - the ID of the TrustedApplication to get
Returns:
a TrustedApplication or null if no application exists with this ID.

getCurrentApplication

public InternalCurrentApplication getCurrentApplication()
Description copied from interface: TrustedApplicationStore
Gets the current application.

Specified by:
getCurrentApplication in interface TrustedApplicationStore
Returns:
a InternalCurrentApplication, or null if no current application currently exists

storeCurrentApplication

public void storeCurrentApplication(InternalCurrentApplication currentApplication)
Description copied from interface: TrustedApplicationStore
Store the given current application.

Specified by:
storeCurrentApplication in interface TrustedApplicationStore
Parameters:
currentApplication - the current application to persist.


Copyright © 2013 Atlassian. All Rights Reserved.