Package io.goobi.viewer.managedbeans
Class AdminClientsBean
java.lang.Object
io.goobi.viewer.managedbeans.AdminClientsBean
- All Implemented Interfaces:
Serializable
Backing bean for pages adminClientEdit.xhtml and adminClients.xhtml
- Author:
- florian
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ClientApplication client) 'Accept' a registered client by setting itsClientApplication.getAccessStatus()toClientApplication.AccessStatus.GRANTEDdelete(ClientApplication client) Delete given client from databaseGet a list of all clients withClientApplication.AccessStatus.GRANTEDGet the internally created client representing all clients for access rights purposesGet a list of all clients withClientApplication.AccessStatus.GRANTEDprClientApplication.AccessStatus.DENIEDGet the model used for paginated listing configured clientsGet a list of all clients withClientApplication.AccessStatus.REQUESTEDGet the currently edited clientGet the id of the client currently being editedbooleanCheck if the current session is with a client application, i.e. if client requests contain the client-application-id headerbooleanCheck if a client application is logged in that is applicable for access privilegesbooleanreject(ClientApplication client) 'Regect a registered client by callingdelete(ClientApplication)on itvoidsave(ClientApplication client) Save the given client to databasevoidsetSelectedClient(ClientApplication selectedClient) Set the currently edited clientvoidSet the client currently being edited by its database id.
-
Field Details
-
DEFAULT_TABLE_FILTER
- See Also:
-
-
Constructor Details
-
AdminClientsBean
public AdminClientsBean()Publi no-args constructor
-
-
Method Details
-
getConfiguredClientsModel
Get the model used for paginated listing configured clients- Returns:
- the configuredClientsModel
-
setSelectedClientId
Set the client currently being edited by its database id.- Parameters:
id- database id. If null or not matching an existing client, the selected client will be null- Throws:
DAOException
-
getSelectedClientId
Get the id of the client currently being edited- Returns:
- client database id or null if no client is selected
-
setSelectedClient
Set the currently edited client- Parameters:
selectedClient- the selectedClient to set
-
getSelectedClient
Get the currently edited client- Returns:
- the selectedClient
-
accept
'Accept' a registered client by setting itsClientApplication.getAccessStatus()toClientApplication.AccessStatus.GRANTED- Parameters:
client-
-
reject
'Regect a registered client by callingdelete(ClientApplication)on it- Parameters:
client-- Returns:
- pretty url of admin/clients overview page
-
save
Save the given client to database- Parameters:
client-
-
delete
Delete given client from database- Parameters:
client-- Returns:
- Navigation outcome
-
getNotConfiguredClients
Get a list of all clients withClientApplication.AccessStatus.REQUESTED- Returns:
- List of clients that are not configured
- Throws:
DAOException
-
getAllAcceptedClients
Get a list of all clients withClientApplication.AccessStatus.GRANTED- Returns:
- List of clients that have been granted
- Throws:
DAOException
-
getAllConfiguredClients
Get a list of all clients withClientApplication.AccessStatus.GRANTEDprClientApplication.AccessStatus.DENIED- Returns:
- List of clients that have been either granted or denied
- Throws:
DAOException
-
getAllClients
Get the internally created client representing all clients for access rights purposes- Returns:
- the allClients
- Throws:
DAOException
-
isClientLoggedIn
public boolean isClientLoggedIn()Check if the current session is with a client application, i.e. if client requests contain the client-application-id header- Returns:
- true if session belongs to a client application
-
isLoggedInClientAccessGranted
public boolean isLoggedInClientAccessGranted()Check if a client application is logged in that is applicable for access privileges- Returns:
- true if the session contains a clientApplication with the accessStatus
ClientApplication.AccessStatus.GRANTEDand if the request ip matches the client's subnet mask
-
isLoggedInClientFromAllowedIP
public boolean isLoggedInClientFromAllowedIP()
-