Author: keith
Date: Mon Apr 14 20:13:01 2008
New Revision: 15648
Log:
Adding some javadoc
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
==============================================================================
---
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
(original)
+++
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
Mon Apr 14 20:13:01 2008
@@ -90,7 +90,7 @@
public static SecureRegistry createSecureRegistry(String username, String
password,
Registry registry,
UserRealm realm) throws
MashupFault {
- SecureRegistry secureRegistry = null;
+ SecureRegistry secureRegistry;
try {
secureRegistry = new SecureRegistry(username, password, registry,
realm);
setAdminBehaviour(secureRegistry);
@@ -105,7 +105,7 @@
public static SecureRegistry createSecureRegistry(String username,
Registry registry,
UserRealm realm)
throws MashupFault {
- SecureRegistry secureRegistry = null;
+ SecureRegistry secureRegistry;
try {
secureRegistry = new SecureRegistry(username, registry, realm);
setAdminBehaviour(secureRegistry);
@@ -147,7 +147,7 @@
* @param resourcePath A path to a Registry Resource
* @param resourceAction An action to be performed on the resource
* @return Whether the user is authorized or not
- * @throws RegistryException
+ * @throws RegistryException Thrown in case a exception occurs in the
registry
*/
public static boolean isAuthorized(Registry registry, String resourcePath,
String resourceAction) throws
RegistryException {
@@ -174,7 +174,7 @@
if (registry instanceof SecureRegistry) {
SecureRegistry secureRegistry = (SecureRegistry) registry;
- String[] userRoles = null;
+ String[] userRoles;
UserStoreReader userStoreReader;
try {
userStoreReader =
secureRegistry.getUserRealm().getUserStoreReader();
@@ -272,8 +272,8 @@
*
* @param registry Secure registry instance.
* @return UserStoreAdmin instance.
- * @throws RegistryException
- * @throws UserStoreException
+ * @throws RegistryException Thrown in case a exception occurs in the
registry
+ * @throws UserStoreException Thrown in case a exception occurs in User
Manager
*/
public static UserStoreAdmin getUserStoreAdmin(Registry registry)
throws RegistryException, UserStoreException {
@@ -289,12 +289,12 @@
*
* @param request Current servlet request.
* @return User's full name.
- * @throws RegistryException
+ * @throws RegistryException Thrown in case a exception occurs in the
registry
*/
public static String getCurrentUserFullName(HttpServletRequest request)
throws RegistryException {
HttpSession session = request.getSession();
- String currentUserFullName = null;
+ String currentUserFullName;
String currentUser;
Registry registry = (Registry)
session.getAttribute(MashupConstants.USER_REGISTRY);
@@ -484,7 +484,7 @@
if (params != null) {
paramsMap = new HashMap(params.length);
for (int i = 0; i < params.length; i++) {
- paramsMap.put(new Integer(i + 1).toString(), params[i]);
+ paramsMap.put(Integer.toString(i + 1), params[i]);
}
}
Resource resultsCollection = registry.executeQuery(queryPath,
paramsMap);
@@ -572,8 +572,8 @@
* @param fullName Full name of user.
* @param eMailId User's e-mail ID.
* @param bio User's bio.
- * @throws UserStoreException
- * @throws RegistryException
+ * @throws UserStoreException Thrown in case a exception occurs in
usermanager
+ * @throws RegistryException Thrown in case a exception occurs in the
registry
*/
public static void createUser(SecureRegistry registry, UserRealm realm,
String userName,
String fullName, String eMailId, String bio)
@@ -666,8 +666,8 @@
* @param fullName Full name of user.
* @param eMailId User's e-mail ID.
* @param bio User's bio.
- * @throws UserStoreException
- * @throws RegistryException
+ * @throws UserStoreException Thrown in case a exception occurs in
usermanager
+ * @throws RegistryException Thrown in case a exception occurs in the
registry
*/
public static void updateUser(SecureRegistry registry, UserStoreAdmin
userStoreAdmin,
String userName, String fullName, String
eMailId, String bio)
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev