/** * Exposes the {@link CredentialsDescriptor} instances appropriate for this {@link CredentialsStore}. * * @return the {@link CredentialsDescriptor} instances appropriate for this {@link CredentialsStore}. */ public List<CredentialsDescriptor> getCredentialsDescriptors() { return store.getCredentialsDescriptors(); }
/** * Exposes the {@link CredentialsDescriptor} instances appropriate for this {@link CredentialsStore}. * * @return the {@link CredentialsDescriptor} instances appropriate for this {@link CredentialsStore}. */ public List<CredentialsDescriptor> getCredentialsDescriptors() { return store.getCredentialsDescriptors(); }
/** * Exposes if this store is enabled for the current user. * * @return {@code true} if the current user can add credentials to this store. */ public boolean isEnabled() { return url != null && store.hasPermission(CREATE) && !store.getCredentialsDescriptors() .isEmpty(); }
/** * Exposes if this store is enabled for the current user. * * @return {@code true} if the current user can add credentials to this store. */ public boolean isEnabled() { return url != null && store.hasPermission(CREATE) && !store.getCredentialsDescriptors() .isEmpty(); }
/** * Checks if this action should be visible. * * @return {@code true} if the action should be visible. */ public boolean isVisible() { CredentialsStore store = getStore(); if (!store.getProvider().isEnabled()) { return false; } CredentialsStoreAction storeAction = store.getStoreAction(); if (storeAction != null && this != storeAction) { // 2.0+ implementations of CredentialsStore should be returning their action via getStoreAction() // and we want to display that action from ViewCredentialsAction // Old implementations will be returning null from getStoreAction() so we let them display as before // Forward looking implementations written against the old API will want to "hide" their old // action and display the new one returned from getStoreAction() which is what this hook enables. return false; } return store.hasPermission(CredentialsProvider.VIEW) && !store.getCredentialsDescriptors().isEmpty(); }
/** * Checks if this action should be visible. * * @return {@code true} if the action should be visible. */ public boolean isVisible() { CredentialsStore store = getStore(); if (!store.getProvider().isEnabled()) { return false; } CredentialsStoreAction storeAction = store.getStoreAction(); if (storeAction != null && this != storeAction) { // 2.0+ implementations of CredentialsStore should be returning their action via getStoreAction() // and we want to display that action from ViewCredentialsAction // Old implementations will be returning null from getStoreAction() so we let them display as before // Forward looking implementations written against the old API will want to "hide" their old // action and display the new one returned from getStoreAction() which is what this hook enables. return false; } return store.hasPermission(CredentialsProvider.VIEW) && !store.getCredentialsDescriptors().isEmpty(); }