List of usage examples for java.security PrivilegedActionException getException
public Exception getException()
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
public void dump(final String path, final Writer writer) throws RegistryException { try {//from ww w .jav a2 s. co m AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { @Override public String run() throws Exception { dumpInternal(path, writer); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
public void setEventingServiceURL(final String path, final String eventingServiceURL) throws RegistryException { try {/*from ww w . ja v a2 s .c o m*/ AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { @Override public String run() throws Exception { setEventingServiceURLInternal(path, eventingServiceURL); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
public void addAssociation(final String sourcePath, final String targetPath, final String associationType) throws RegistryException { try {// w w w . j ava 2 s . co m AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { @Override public String run() throws Exception { addAssociationInternal(sourcePath, targetPath, associationType); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
public void removeAssociation(final String sourcePath, final String targetPath, final String associationType) throws RegistryException { try {/* w ww .j ava 2 s .c o m*/ AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { @Override public String run() throws Exception { removeAssociationInternal(sourcePath, targetPath, associationType); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
public void invokeAspect(final String resourcePath, final String aspectName, final String action) throws RegistryException { try {//from w ww. ja v a2 s .co m AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { @Override public String run() throws Exception { invokeAspectInternal(resourcePath, aspectName, action); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
public void createLink(final String path, final String target, final String subTargetPath) throws RegistryException { try {//from w w w .ja va 2s . com AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { @Override public String run() throws Exception { createLinkInternal(path, target, subTargetPath); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
/** * Create a user registry with authorizing a user * * @param userName the username of the user accessing * @param password the password credentials * @param tenantId the tenant the user belong to * @param coreRegistry either RemoteRegistry or the EmbeddedRegistry * @param realmService the realm provided by user manager * @param chroot the base prefix if the registry needed to chrooted, if provided null * non-chroot registry will be constructed. * * @throws RegistryException if the creation of this instance failed. *//*from w ww . j a v a2s . c o m*/ public UserRegistry(final String userName, final String password, final int tenantId, final Registry coreRegistry, final RealmService realmService, final String chroot) throws RegistryException { try { AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { @Override public Object run() throws Exception { init(userName, password, tenantId, coreRegistry, realmService, chroot); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.registry.core.session.UserRegistry.java
/** * Creates a user registry without authorizing the user * * @param userName the username of the user accessing * @param tenantId the tenant the user belong to * @param coreRegistry either RemoteRegistry or the EmbeddedRegistry * @param realmService the realm provided by user manager * @param chroot the base prefix if the registry needed to chrooted, if provided null * non-chroot registry will be constructed. * @param disableCaching whether caching is to be turned off. * * @throws RegistryException if the creation of this instance failed. *///from w w w. ja va 2 s. c o m public UserRegistry(final String userName, final int tenantId, final Registry coreRegistry, final RealmService realmService, final String chroot, final boolean disableCaching) throws RegistryException { try { AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { @Override public Object run() throws Exception { init(userName, tenantId, coreRegistry, realmService, chroot, disableCaching); return null; } }); } catch (PrivilegedActionException e) { throw (RegistryException) e.getException(); } }
From source file:org.wso2.carbon.user.core.common.AbstractUserStoreManager.java
private UserStore getUserStore(final String user) throws UserStoreException { try {/* w w w . j a va 2 s . c om*/ return AccessController.doPrivileged(new PrivilegedExceptionAction<UserStore>() { @Override public UserStore run() throws Exception { return getUserStoreInternal(user); } }); } catch (PrivilegedActionException e) { throw (UserStoreException) e.getException(); } }
From source file:org.wso2.carbon.user.core.common.AbstractUserStoreManager.java
public final void updateUserListOfRole(final String roleName, final String[] deletedUsers, final String[] newUsers) throws UserStoreException { try {//from w ww .j a va 2 s. co m AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { @Override public String run() throws Exception { updateUserListOfRoleInternal(roleName, deletedUsers, newUsers); return null; } }); } catch (PrivilegedActionException e) { throw (UserStoreException) e.getException(); } }