Author: shawkins
Date: 2009-04-02 22:07:14 -0400 (Thu, 02 Apr 2009)
New Revision: 700
Removed:
trunk/server/src/main/java/com/metamatrix/platform/config/service/ActionHistory.java
Modified:
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/AuthorizationAdminAPI.java
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/ExtensionSourceAdminAPI.java
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java
trunk/common-internal/src/main/java/com/metamatrix/server/admin/api/RuntimeMetadataAdminAPI.java
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/AuthorizationAdminAPIImpl.java
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/ExtensionSourceAdminAPIImpl.java
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java
trunk/server/src/main/java/com/metamatrix/server/admin/apiimpl/RuntimeMetadataAdminAPIImpl.java
Log:
removing unused subsystem methods
Modified:
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/AuthorizationAdminAPI.java
===================================================================
---
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/AuthorizationAdminAPI.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/AuthorizationAdminAPI.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -51,16 +51,6 @@
throws InvalidSessionException, AuthorizationException, MetaMatrixComponentException;
/**
- * Obtain the names of all of the realms known to the system.
- * @return the set of realm names
- * @throws InvalidSessionException if the <code>SessionToken</code> is
not valid or is expired
- * @throws AuthorizationException if the caller is unable to perform this operation
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- Collection getRealmNames()
- throws InvalidSessionException, AuthorizationException,
MetaMatrixComponentException;
-
- /**
* Obtain the names of all of the roles and their descriptions known to the system.
* @return a Map of role descriptions key by the role's name.
* @throws InvalidSessionException if the <code>SessionToken</code> is
not valid or is expired
@@ -133,17 +123,6 @@
throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException;
/**
- * Remove the policy with the specified ID.
- * @param policyID the ID of the policy that is to be removed.
- * @throws InvalidSessionException if the <code>sessionToken</code> is
not valid or is expired
- * @throws AuthorizationException if the caller is unable to perform this operation
- * @throws MetaMatrixComponentException if this service is unable to locate resources
required
- * for this operation
- */
- void removePolicy(AuthorizationPolicyID policyID)
- throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
* Locate the IDs of all of the policies that are accessible by the caller.
* @param caller the session token of the principal that is attempting to access the
policies.
* @return the set of all policy IDs
@@ -156,30 +135,6 @@
throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException;
/**
- * Locate the IDs of all of the policies that apply to the specified principal and
that are accessible by the caller.
- * @param principals the Set of UserGroupIDs and/or UserAccountIDs to whom the
returned policies should apply to
- * (may not null, empty or invalid, all of which would result in an empty result)
- * @return the set of all policy IDs; never null but possibly empty
- * @throws InvalidSessionException if the <code>SessionToken</code> is
not valid or is expired
- * @throws AuthorizationException if the caller is unable to perform this operation
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- Collection findPolicyIDs(Collection principals)
- throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
- * Locate the policies that have the specified IDs. Any ID that is invalid is
simply
- * ignored.
- * @param policyIDs the policy IDs for which the policies are to be obtained
- * @return the set of entitlements that correspond to those specified IDs that are
valid
- * @throws InvalidSessionException if the <code>SessionToken</code> is
not valid or is expired
- * @throws AuthorizationException if the caller is unable to perform this operation
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- Collection getPolicies(Collection policyIDs)
- throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
* Return whether there is an existing policy with the specified ID.
* @param id the ID that is to be checked
* @return true if a policy with the specified ID exists
@@ -216,36 +171,7 @@
throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
/**
- * Remove given Principal from <emph>ALL</emph>
<code>AuthorizationPolicies</code> to
- * which he belongs.
- * @param principal <code>MetaMatrixPrincipalName</code> which should be
deleted.
- * @return true if at least one policy in which the principal had authorization
- * was found and deleted, false otherwise.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- Boolean removePrincipalFromAllPolicies(MetaMatrixPrincipalName principal)
- throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
* Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
- * that have <code>AuthorizationPermission</code>s in the given
<code>AuthorizationRealm</code>.<br>
- * <strong>NOTE:</strong> It is the responsibility of the caller to
determine
- * which of the <code>AuthorizationPolicy</code>'s
<code>AuthorizationPermission</code>s
- * are actually in the given <code>AuthorizationRealm</code>. The
<code>AuthorizationPolicy</code>
- * may span <code>AuthorizationRealm</code>s.
- * @param realm The realm in which to search for
<code>AuthorizationPermission</code>s.
- * @return The collection of <code>AuthorizationPolicyID</code>s that
have permissions
- * in the given realm - possibly empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- Collection getPolicyIDsWithPermissionsInRealm(AuthorizationRealm realm)
- throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
- * Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
* in the given <code>AuthorizationRealm</code>.
* <br>This method will only work for Data Access Authorizations because the
realm
* is encoded in a Data Access policy name.
@@ -262,105 +188,5 @@
*/
Collection getPolicyIDsInRealm(AuthorizationRealm realm)
throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
- * Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
- * that have <code>AuthorizationPermissions</code> that exist in the
given
- * <emph>partial</emph>
<code>AuthorizationRealm</code>.<br>
- * The implementation is such that all
<code>AuthorizationPolicyID</code>s
- * whose <code>AuthorizationRealm</code> <emph>starts
with</emph> the given
- * <code>AuthorizationRealm</code> are returned.
- * @param realm The <emph>partial</emph> realm in which to search for
- * <code>AuthorizationPermission</code>s whose realm name
<emph>starts with</emph>
- * the given realm.
- * @return The collection of <code>AuthorizationPolicyID</code>s that
have permissions
- * in the given partial realm - possibly empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- Collection getPolicyIDsInPartialRealm(AuthorizationRealm realm)
- throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
- * Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
- * that have <code>AuthorizationPermissions</code> on the given resource
that
- * exists in the given <code>AuthorizationRealm</code>.<br>
- * @param realm The realm in which to search for
<code>AuthorizationPermission</code>s.
- * @param resourceName The resource for which to search for
<code>AuthorizationPermission</code>s.
- * @return The collection of <code>AuthorizationPolicyID</code>s that
have permissions
- * on the given resource - possibly empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- Collection getPolicyIDsForResourceInRealm(AuthorizationRealm realm, String
resourceName)
- throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
- * Verify that caller is in the specified logical role.
- * @param caller The session token of the MetaMatrix principle involking an
administrative method.
- * @return true if caller's session token is valid and he is a MetaMatrix
administrator.
- * @throws AuthorizationMgmtException if this service has trouble connecting to
services it uses.
- */
- boolean isCallerInRole( SessionToken caller, String roleName )
- throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
- * Returns a <code>List</code> of entitlements to the given fully
qualified group name in the given realm.
- * <p>The list contains objects of type {@link
com.metamatrix.platform.security.api.UserEntitlementInfo UserEntitlementInfo}
- * which will contain all user entitlement information for each group found. Each of
these objects
- * will contain 1 or more objects of type {@link
com.metamatrix.platform.security.api.GranteeEntitlementEntry GranteeEntitlementEntry}
- * which contain the <i>Grantee</i>'s name the entitlement
<i>Grantor</i> or entity specifying the <i>Grantee</i>
- * is entitled and the <i>Allowed Actions</i> the
<i>Grantee</i> is entitled to perform on the group.</p>
- * The attributes availible are:
- * <ol>
- * <li value=1>VDB Name</li>
- * <li>VDB Version</li>
- * <li>Group Name (fully qualified)</li>
- * <ul>
- * <li>Grantee Name; Grantor Name; Allowed Actions (A
<code>String[]</code> of one or more of {CREATE, READ, UPDATE,
DELETE})</li>
- * <li> ... </li>
- * </ul>
- * </ol>
- * @param realm The realm in which the element must live.
- * @param fullyQualifiedGroupName The resource for which to look up permissions.
- * @return The <code>List</code> of entitlements to the given element in
the
- * given realm - May be empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- List getGroupEntitlements(AuthorizationRealm realm, String fullyQualifiedGroupName)
- throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
-
- /**
- * Returns a <code>List</code> of entitlements to the given element
pattern in the given realm.
- * <p>The list contains objects of type {@link
com.metamatrix.platform.security.api.UserEntitlementInfo UserEntitlementInfo}
- * which will contain all user entitlement information for each element found. Each
of these objects
- * will contain 1 or more objects of type {@link
com.metamatrix.platform.security.api.GranteeEntitlementEntry GranteeEntitlementEntry}
- * which contain the <i>Grantee</i>'s name the entitlement
<i>Grantor</i> or entity specifying the <i>Grantee</i>
- * is entitled and the <i>Allowed Actions</i> the
<i>Grantee</i> is entitled to perform on the element.</p>
- * The attributes availible are:
- * <ol>
- * <li value=1>VDB Name</li>
- * <li>VDB Version</li>
- * <li>Group Name (fully qualified)</li>
- * <li>Element Name (fully qualified)</li>
- * <ul>
- * <li>Grantee Name; Grantor Name; Allowed Actions (A
<code>String[]</code> of one or more of {CREATE, READ, UPDATE,
DELETE})</li>
- * <li> ... </li>
- * </ul>
- * </ol>
- * @param realm The realm in which the element must live.
- * @param elementNamePattern The resource for which to look up permissions. SQL
'%' pattern matching may be used.
- * @return The <code>List</code> of entitlements to the given element in
the
- * given realm - May be empty but never null.
- * @throws AuthorizationMgmtException if this service is unable to locate resources
required
- * for this operation.
- * @throws ServiceStateException if the Authorization service is not taking
requests.
- */
- List getElementEntitlements(AuthorizationRealm realm, String elementNamePattern)
- throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException,
MetaMatrixComponentException;
}
Modified:
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/ExtensionSourceAdminAPI.java
===================================================================
---
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/ExtensionSourceAdminAPI.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/ExtensionSourceAdminAPI.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -130,22 +130,6 @@
throws InvalidSessionException, AuthorizationException,
MetaMatrixComponentException;
/**
- * Returns List of ExtensionSourceDescriptor objects of indicated type,
- * in order of their search ordering
- * @param type one of the known types of extension file
- * @return List of ExtensionSourceDescriptor objects of indicated type,
- * in order of their search ordering
- * @throws InvalidSessionException if there is not a valid administrative session
- * @throws AuthorizationException if the administrator does not have privileges to
use this method
- * @throws InvalidExtensionTypeException if the indicated type is not one
- * of the currently-supported extension source types
- * @throws MetaMatrixComponentException indicating a non-business-related
- * exception (such as a communication exception)
- */
- List getSourceDescriptors(String type)
- throws InvalidSessionException, AuthorizationException,
InvalidExtensionModuleTypeException, MetaMatrixComponentException;
-
- /**
* Returns the ExtensionSourceDescriptor object for the extension
* source indicated by sourceName
* @param sourceName name (e.g. filename) of extension source
Modified:
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java
===================================================================
---
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/common-internal/src/main/java/com/metamatrix/platform/admin/api/RuntimeStateAdminAPI.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -58,40 +58,6 @@
MetaMatrixComponentException;
/**
- * Return all services running in mm system.
- *
- * @param callerSessionID
- * ID of the caller's current session.
- * @return List of ServiceIDs.
- * @throws AuthorizationException
- * if caller is not authorized to perform this method.
- * @throws InvalidSessionException
- * if the <code>callerSessionID</code> is not valid or is
expired.
- * @throws MetaMatrixComponentException
- * if an error occurred in communicating with a component.
- */
- List getServices() throws AuthorizationException,
- InvalidSessionException,
- MetaMatrixComponentException;
-
- /**
- * Return all hosts running in mm system.
- *
- * @param callerSessionID
- * ID of the caller's current session.
- * @return List of String Host names..
- * @throws AuthorizationException
- * if caller is not authorized to perform this method.
- * @throws InvalidSessionException
- * if the <code>callerSessionID</code> is not valid or is
expired.
- * @throws MetaMatrixComponentException
- * if an error occurred in communicating with a component.
- */
- List getHosts() throws AuthorizationException,
- InvalidSessionException,
- MetaMatrixComponentException;
-
- /**
* Stop service once work is complete.
*
* @param callerSessionID
@@ -383,24 +349,6 @@
MetaMatrixComponentException;
/**
- * Sets the <code>LogConfiguration</code> on the
<code>LogManager</code> running in the given VM.
- *
- * @param logConfig
- * The log configuration with which to affect the log properties.
- * @param vmID
- * The ID of the VM for which to set log configuration used to affect the
configuration database.
- * @throws AuthorizationException
- * if caller is not authorized to perform this method.
- * @throws InvalidSessionException
- * if the <code>callerSessionID</code> is not valid or is
expired.
- * @throws MetaMatrixComponentException
- * if an error occurred in communicating with a component.
- */
- void setLoggingConfiguration(LogConfiguration logConfig, String hostName, String
processName) throws AuthorizationException,
- InvalidSessionException,
- MetaMatrixComponentException;
-
- /**
* Return Collection of QueueStats for service.
*
* @param serviceID
Modified:
trunk/common-internal/src/main/java/com/metamatrix/server/admin/api/RuntimeMetadataAdminAPI.java
===================================================================
---
trunk/common-internal/src/main/java/com/metamatrix/server/admin/api/RuntimeMetadataAdminAPI.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/common-internal/src/main/java/com/metamatrix/server/admin/api/RuntimeMetadataAdminAPI.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -96,19 +96,6 @@
throws AuthorizationException, InvalidSessionException, VirtualDatabaseException,
MetaMatrixComponentException;
/**
- * Get connector binding names for a given virtual database.
- *
- * @param vdbID ID of the VirtualDatabase.
- * @return Map of ModelIDs and String connector binding names.
- * @throws AuthorizationException if caller is not authorized to perform this
method.
- * @throws InvalidSessionException if the <code>callerSessionID</code> is
not valid or is expired.
- * @throws VirtualDatabaseException if an error occurs while setting the state.
- * @throws MetaMatrixComponentException if an error occurs in communicating with a
component.
- */
- Map getConnectorBindingNames(VirtualDatabaseID vdbID)
- throws AuthorizationException, InvalidSessionException, VirtualDatabaseException,
MetaMatrixComponentException;
-
- /**
* Given a routing ID, find all VDBs whose models use the connector binding.
*
* @param routingID ID of the connector binding.
@@ -269,21 +256,6 @@
// throws AuthorizationException, InvalidSessionException,
VirtualDatabaseException, MetaMatrixComponentException;
/**
- * Get the visibility levels for models in a given virtual database.
- *
- * @param vdbID ID of the VirtualDatabase.
- * @return Map of ModelIDs and Short visibility levels.
- * Visibility levels are defined in MetadataConstants.VISIBILITY_TYPES.
- * @throws AuthorizationException if caller is not authorized to perform this
method.
- * @throws InvalidSessionException if the <code>callerSessionID</code> is
not valid or is expired.
- * @throws VirtualDatabaseException if an error occurs while setting the state.
- * @throws MetaMatrixComponentException if an error occurs in communicating with a
component.
- */
- public Map getModelVisibilityLevels(VirtualDatabaseID vdbID)
- throws AuthorizationException, InvalidSessionException, VirtualDatabaseException,
MetaMatrixComponentException;
-
-
- /**
* Call to obtain the VDB Definition that can be used
* for importing or exporting.
*
Modified:
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/AuthorizationAdminAPIImpl.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/AuthorizationAdminAPIImpl.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/AuthorizationAdminAPIImpl.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -90,21 +90,6 @@
return new AuthorizationObjectEditor(true);
}
- /**
- * Obtain the names of all of the realms known to the system.
- * @return the set of realm names
- * @throws InvalidSessionException if the <code>SessionToken</code> is
not valid or is expired
- * @throws AuthorizationException if the caller is unable to perform this operation
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- public synchronized Collection getRealmNames()
- throws InvalidSessionException, AuthorizationException,
MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.getRealmNames(token);
- }
-
public synchronized Map getRoleDescriptions()
throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException {
// Validate caller's session
@@ -162,32 +147,6 @@
}
/**
- * Add the given principal to the given roles.
- * @param principal The <code>MetaMatrixPrincipalName</code> to add
- * @param roleNames The <code>Collection</code> of
<code>String</code> role names of which to add the principal.
- * @throws InvalidSessionException if the administrative session is invalid
- * @throws AuthorizationException if admninistrator does not have the authority to
perform the requested operation.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- public synchronized void addPrincipalToRoles(MetaMatrixPrincipalName principal,
Collection roleNames)
- throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Validate caller's role
- AdminAPIHelper.checkForRequiredRole(token, AdminRoles.RoleName.ADMIN_SYSTEM,
"AuthorizationAdminAPIImpl.addPrincipalToRoles(" + principal + ", " +
roleNames + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- AuthorizationObjectEditor editor = new AuthorizationObjectEditor();
- Iterator roleItr = roleNames.iterator();
- while (roleItr.hasNext()) {
- String roleName = (String) roleItr.next();
- AuthorizationPolicy role = authAdmin.getPolicy(token,new
AuthorizationPolicyID(roleName, null, RolePermissionFactory.getRealm()));
- role = editor.addPrincipal(role, principal);
- }
- ModificationActionQueue queue = editor.getDestination();
- authAdmin.executeTransaction(token, queue.popActions());
- }
-
- /**
* Remove the given set of principals from the given role.
* @param principals Set of <code>MetaMatrixPrincipalName</code>s to
remove.
* @param roleName The name of the role from which to remove the principals.
@@ -212,28 +171,6 @@
}
/**
- * Remove the policy with the specified ID.
- * @param policyID the ID of the policy that is to be removed.
- * @throws InvalidSessionException if the <code>sessionToken</code> is
not valid or is expired
- * @throws AuthorizationException if the caller is unable to perform this operation
- * @throws MetaMatrixComponentException if this service is unable to locate resources
required
- * for this operation
- */
- public synchronized void removePolicy(AuthorizationPolicyID policyID)
- throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Validate caller's role
- AdminAPIHelper.checkForRequiredRole(token, AdminRoles.RoleName.ADMIN_SYSTEM,
"AuthorizationAdminAPIImpl.removePolicy(" + policyID +")");
//$NON-NLS-1$ //$NON-NLS-2$
-
- AuthorizationObjectEditor aoe = new AuthorizationObjectEditor(true);
- aoe.remove(policyID);
- ModificationActionQueue queue = aoe.getDestination();
-
- authAdmin.executeTransaction(token, queue.popActions());
- }
-
- /**
* Get all policyIDs in the system except those that we want to filter from the
console.
*/
public synchronized Collection findAllPolicyIDs()
@@ -259,22 +196,6 @@
return filteredPolicyIDs;
}
- public synchronized Collection findPolicyIDs(Collection principals)
- throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.findPolicyIDs(token, principals);
- }
-
- public synchronized Collection getPolicies(Collection policyIDs)
- throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.getPolicies(token, policyIDs);
- }
-
public synchronized Boolean containsPolicy(AuthorizationPolicyID policyID)
throws AuthorizationException, InvalidSessionException,
MetaMatrixComponentException {
// Validate caller's session
@@ -300,39 +221,8 @@
return authAdmin.executeTransaction(token, actions);
}
- public synchronized Boolean removePrincipalFromAllPolicies(MetaMatrixPrincipalName
principal)
- throws AuthorizationException, AuthorizationMgmtException,
InvalidSessionException, MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Validate caller's role
- AdminAPIHelper.checkForRequiredRole(token, AdminRoles.RoleName.ADMIN_SYSTEM,
"AuthorizationAdminAPIImpl.removePrincipalFromAllPolicies(" + principal
+")"); //$NON-NLS-1$ //$NON-NLS-2$
- return new Boolean(authAdmin.removePrincipalFromAllPolicies(token, principal));
- }
-
/**
* Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
- * that have <code>AuthorizationPermission</code>s in the given
<code>AuthorizationRealm</code>.<br>
- * <strong>NOTE:</strong> It is the responsibility of the caller to
determine
- * which of the <code>AuthorizationPolicy</code>'s
<code>AuthorizationPermission</code>s
- * are actually in the given <code>AuthorizationRealm</code>. The
<code>AuthorizationPolicy</code>
- * may span <code>AuthorizationRealm</code>s.
- * @param realm The realm in which to search for
<code>AuthorizationPermission</code>s.
- * @return The collection of <code>AuthorizationPolicyID</code>s that
have permissions
- * in the given realm - possibly empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- public synchronized Collection getPolicyIDsWithPermissionsInRealm(AuthorizationRealm
realm)
- throws AuthorizationException, AuthorizationMgmtException,
InvalidSessionException, MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.getPolicyIDsWithPermissionsInRealm(token, realm);
- }
-
- /**
- * Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
* in the given <code>AuthorizationRealm</code>.
* <br>This method will only work for Data Access Authorizations because the
realm
* is encoded in a Data Access policy name.
@@ -356,64 +246,6 @@
}
/**
- * Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
- * that have <code>AuthorizationPermissions</code> that exist in the
given
- * <emph>partial</emph>
<code>AuthorizationRealm</code>.<br>
- * The implementation is such that all
<code>AuthorizationPolicyID</code>s
- * whose <code>AuthorizationRealm</code> <emph>starts
with</emph> the given
- * <code>AuthorizationRealm</code> are returned.
- * @param realm The <emph>partial</emph> realm in which to search for
- * <code>AuthorizationPermission</code>s whose realm name
<emph>starts with</emph>
- * the given realm.
- * @return The collection of <code>AuthorizationPolicyID</code>s that
have permissions
- * in the given partial realm - possibly empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- public synchronized Collection getPolicyIDsInPartialRealm(AuthorizationRealm realm)
- throws AuthorizationException, AuthorizationMgmtException,
InvalidSessionException, MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.getPolicyIDsInPartialRealm(token, realm);
- }
-
- /**
- * Returns a <code>Collection</code> of
<code>AuthorizationPolicyID</code>s
- * that have <code>AuthorizationPermissions</code> on the given resource
that
- * exists in the given <code>AuthorizationRealm</code>.<br>
- * @param realm The realm in which to search for
<code>AuthorizationPermission</code>s.
- * @param resourceName The resource for which to search for
<code>AuthorizationPermission</code>s.
- * @return The collection of <code>AuthorizationPolicyID</code>s that
have permissions
- * on the given resource - possibly empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- public synchronized Collection getPolicyIDsForResourceInRealm(AuthorizationRealm
realm, String resourceName)
- throws AuthorizationException, AuthorizationMgmtException,
InvalidSessionException, MetaMatrixComponentException {
- // Validate caller's session
- SessionToken token = AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.getPolicIDsForResourceInRealm(token, realm, resourceName);
- }
-
- /**
- * Verify that caller is in the specified logical role.
- * @param caller The session token of the MetaMatrix principle involking an
administrative method.
- * @return true if caller's session token is valid and he is a MetaMatrix
administrator.
- * @throws AuthorizationMgmtException if this service has trouble connecting to
services it uses.
- */
- public synchronized boolean isCallerInRole(SessionToken caller, String roleName)
- throws AuthorizationException, AuthorizationMgmtException,
InvalidSessionException, MetaMatrixComponentException {
- // Validate caller's session
- AdminAPIHelper.validateSession(caller.getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.isCallerInRole(caller, roleName);
- }
-
- /**
* Return true is given username is a super user
* @param username - The user to verify as super user
* @return true if given user is a super user
@@ -423,72 +255,5 @@
final MembershipServiceInterface membershipService =
PlatformProxyHelper.getMembershipServiceProxy(PlatformProxyHelper.ROUND_ROBIN_LOCAL);
return membershipService.isSuperUser(username);
}
-
- /**
- * Returns a <code>List</code> of entitlements to the given fully
qualified group name in the given realm.
- * <p>The list contains objects of type {@link
com.metamatrix.platform.security.api.UserEntitlementInfo UserEntitlementInfo}
- * which will contain all user entitlement information for each group found. Each of
these objects
- * will contain 1 or more objects of type {@link
com.metamatrix.platform.security.api.GranteeEntitlementEntry GranteeEntitlementEntry}
- * which contain the <i>Grantee</i>'s name the entitlement
<i>Grantor</i> or entity specifying the <i>Grantee</i>
- * is entitled and the <i>Allowed Actions</i> the
<i>Grantee</i> is entitled to perform on the group.</p>
- * The attributes availible are:
- * <ol>
- * <li value=1>VDB Name</li>
- * <li>VDB Version</li>
- * <li>Group Name (fully qualified)</li>
- * <ul>
- * <li>Grantee Name; Grantor Name; Allowed Actions (A
<code>String[]</code> of one or more of {CREATE, READ, UPDATE,
DELETE})</li>
- * <li> ... </li>
- * </ul>
- * </ol>
- * @param realm The realm in which the element must live.
- * @param fullyQualifiedGroupName The resource for which to look up permissions.
- * @return The <code>List</code> of entitlements to the given element in
the
- * given realm - May be empty but never null.
- * @throws AuthorizationException if admninistrator does not have the authority to
preform the action.
- * @throws AuthorizationMgmtException if an error occurs in the Authorization store.
- * @throws MetaMatrixComponentException if this service has trouble communicating.
- */
- public synchronized List getGroupEntitlements(AuthorizationRealm realm, String
fullyQualifiedGroupName)
- throws AuthorizationException, AuthorizationMgmtException,
InvalidSessionException, MetaMatrixComponentException {
- // Validate caller's session
-// SessionToken token =
- AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.getGroupEntitlements(realm, fullyQualifiedGroupName);
- }
-
- /**
- * Returns a <code>List</code> of entitlements to the given element
pattern in the given realm.
- * <p>The list contains objects of type {@link
com.metamatrix.platform.security.api.UserEntitlementInfo UserEntitlementInfo}
- * which will contain all user entitlement information for each element found. Each
of these objects
- * will contain 1 or more objects of type {@link
com.metamatrix.platform.security.api.GranteeEntitlementEntry GranteeEntitlementEntry}
- * which contain the <i>Grantee</i>'s name the entitlement
<i>Grantor</i> or entity specifying the <i>Grantee</i>
- * is entitled and the <i>Allowed Actions</i> the
<i>Grantee</i> is entitled to perform on the element.</p>
- * The attributes availible are:
- * <ol>
- * <li value=1>VDB Name</li>
- * <li>VDB Version</li>
- * <li>Group Name (fully qualified)</li>
- * <li>Element Name (fully qualified)</li>
- * <ul>
- * <li>Grantee Name; Grantor Name; Allowed Actions (A
<code>String[]</code> of one or more of {CREATE, READ, UPDATE,
DELETE})</li>
- * <li> ... </li>
- * </ul>
- * </ol>
- * @param realm The realm in which the element must live.
- * @param elementNamePattern The resource for which to look up permissions. SQL
'%' pattern matching may be used.
- * @return The <code>List</code> of entitlements to the given element in
the
- * given realm - May be empty but never null.
- * @throws AuthorizationMgmtException if this service is unable to locate resources
required
- * for this operation.
- */
- public synchronized List getElementEntitlements(AuthorizationRealm realm, String
elementNamePattern)
- throws AuthorizationException, AuthorizationMgmtException,
InvalidSessionException, MetaMatrixComponentException {
- // Validate caller's session
- AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
- return authAdmin.getElementEntitlements(realm, elementNamePattern);
- }
}
Modified:
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/ExtensionSourceAdminAPIImpl.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/ExtensionSourceAdminAPIImpl.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/ExtensionSourceAdminAPIImpl.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -168,26 +168,6 @@
}
/**
- * Returns List of ExtensionSourceDescriptor objects of indicated type,
- * in order of their search ordering
- * @param type one of the known types of extension file
- * @return List of ExtensionSourceDescriptor objects of indicated type,
- * in order of their search ordering
- * @throws InvalidSessionException if there is not a valid administrative session
- * @throws AuthorizationException if the administrator does not have privileges to
use this method
- * @throws InvalidExtensionTypeException if the indicated type is not one
- * of the currently-supported extension source types
- * @throws MetaMatrixComponentException indicating a non-business-related
- * exception (such as a communication exception)
- */
- public synchronized List getSourceDescriptors(String type)
- throws InvalidSessionException, AuthorizationException,
InvalidExtensionModuleTypeException, MetaMatrixComponentException{
-// SessionToken token =
- AdminAPIHelper.validateSession(getSessionID());
- return getExtensionSourceManager().getSourceDescriptors(type);
- }
-
- /**
* Returns the ExtensionSourceDescriptor object for the extension
* source indicated by sourceName
* @param sourceName name (e.g. filename) of extension source
Modified:
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/server/src/main/java/com/metamatrix/platform/admin/apiimpl/RuntimeStateAdminAPIImpl.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -73,9 +73,6 @@
public class RuntimeStateAdminAPIImpl extends SubSystemAdminAPIImpl implements
RuntimeStateAdminAPI {
- // Config svc proxy
- private ConfigurationServiceInterface configAdmin;
-
protected Set listeners = new HashSet();
private RuntimeStateAdminAPIHelper helper;
@@ -93,7 +90,6 @@
*/
private RuntimeStateAdminAPIImpl(ClusteredRegistryState registry, HostManagement
hostManagement) throws MetaMatrixComponentException {
this.registry = registry;
- configAdmin =
PlatformProxyHelper.getConfigurationServiceProxy(PlatformProxyHelper.ROUND_ROBIN_LOCAL);
helper = RuntimeStateAdminAPIHelper.getInstance(registry, hostManagement);
}
@@ -150,27 +146,6 @@
/**
- * Return all hosts running in mm system.
- *
- * @return List of HostRegistryBindings.
- * @throws AuthorizationException
- * if caller is not authorized to perform this method.
- * @throws InvalidSessionException
- * if the <code>callerSessionID</code> is not valid or is
expired.
- * @throws MetaMatrixComponentException
- * if an error occurred in communicating with a component.
- */
- public synchronized List<String> getHosts() throws AuthorizationException,
-
InvalidSessionException,
-
MetaMatrixComponentException {
-
- // Validate caller's session
- AdminAPIHelper.validateSession(getSessionID());
-
- return helper.getHosts();
- }
-
- /**
* Stop service once work is complete.
*
* @param serviceID
Deleted:
trunk/server/src/main/java/com/metamatrix/platform/config/service/ActionHistory.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/config/service/ActionHistory.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/server/src/main/java/com/metamatrix/platform/config/service/ActionHistory.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.platform.config.service;
-
-import java.util.*;
-
-import com.metamatrix.platform.PlatformPlugin;
-import com.metamatrix.platform.util.ErrorMessageKeys;
-
-/**
- * This class maintains a history of actions. The "maximum size" of
- * the history can be specified. However, when the history is pruned,
- * it is done so in whole transactions.
- *
- */
-public class ActionHistory {
-
- public static final int DEFAULT_ACTION_COUNT_LIMIT = 100;
-
- private LinkedList actions = new LinkedList();
- private LinkedList actionCountInTransactions = new LinkedList();
- private int actionCountLimit = DEFAULT_ACTION_COUNT_LIMIT;
-
- public ActionHistory() {
- }
-
- public synchronized void addActionsForTransaction( List newActions ) {
- if ( newActions == null || newActions.isEmpty() ) {
- return;
- }
-
- // Add the actions to the history ...
- Iterator iter = newActions.iterator();
- while ( iter.hasNext() ) {
- this.actions.addFirst( iter.next() );
- }
- this.actionCountInTransactions.addFirst( new Integer(newActions.size()) );
-
- // Prune the history if required ...
- this.pruneIfRequired();
- }
-
- public synchronized int getHistorySize() {
- return this.actions.size();
- }
-
- public synchronized List getHistory() {
- return this.actions;
- }
-
- public synchronized List pop( int count ) {
- List result = new LinkedList();
- if ( count > 0 ) {
- int actualCount = count;
- if ( actualCount > this.actions.size() ) {
- actualCount = this.actions.size();
- }
- for ( int i=0; i!=actualCount; ++i ) {
- result.add( this.actions.removeFirst() );
- }
- }
- return result;
- }
-
- public int getHistoryLimit() {
- return this.actionCountLimit;
- }
-
- public synchronized void clearHistory() {
- this.actions.clear();
- this.actionCountInTransactions.clear();
- }
-
- public synchronized void setHistoryLimit( int newLimit ) {
- if ( newLimit < 0 ) {
- throw new
IllegalArgumentException(PlatformPlugin.Util.getString(ErrorMessageKeys.CONFIG_0037));
- }
- this.actionCountLimit = newLimit;
- this.pruneIfRequired();
- }
-
- protected void pruneIfRequired() {
- int newSize = this.actions.size();
-
- // If the new size is greater than the limit, check whether the history
- // should be shrunk ...
- if ( newSize > actionCountLimit ) {
- // Get the number of actions in the earliest transaction.
- Integer countInEarliestTransaction = (Integer)
actionCountInTransactions.getLast();
-
- // Remove all of the actions in the transaction ONLY IF the history
- // would we still be greater than the limit ...
- int numberToBeRemoved = countInEarliestTransaction.intValue();
- if ( newSize - numberToBeRemoved > actionCountLimit ) {
- for ( int i=0; i!= numberToBeRemoved; ++i ) {
- this.actions.removeLast();
- }
- actionCountInTransactions.removeLast();
- }
- }
- }
-
-}
-
Modified:
trunk/server/src/main/java/com/metamatrix/server/admin/apiimpl/RuntimeMetadataAdminAPIImpl.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/server/admin/apiimpl/RuntimeMetadataAdminAPIImpl.java 2009-04-03
01:38:21 UTC (rev 699)
+++
trunk/server/src/main/java/com/metamatrix/server/admin/apiimpl/RuntimeMetadataAdminAPIImpl.java 2009-04-03
02:07:14 UTC (rev 700)
@@ -256,43 +256,6 @@
}
/**
- * Get connector binding names for a given virtual database.
- *
- * @param vdbID ID of the VirtualDatabase.
- * @return Map of ModelIDs and String connector binding names.
- * @throws AuthorizationException if caller is not authorized to perform this
method.
- * @throws InvalidSessionException if the <code>callerSessionID</code> is
not valid or is expired.
- * @throws VirtualDatabaseException if an error occurs while setting the state.
- * @throws MetaMatrixComponentException if an error occurs in communicating with a
component.
- */
- public synchronized Map getConnectorBindingNames(VirtualDatabaseID vdbID)
- throws AuthorizationException, InvalidSessionException, VirtualDatabaseException,
MetaMatrixComponentException {
-
- // Validate caller's session
- AdminAPIHelper.validateSession(getSessionID());
- // Any administrator may call this read-only method - no need to validate role
-
- Collection models = RuntimeMetadataCatalog.getInstance().getModels(vdbID);
- Map modelIDsCBNames = new HashMap();
- Iterator iter = models.iterator();
- while (iter.hasNext()) {
- Model model = (Model) iter.next();
- List cbNames = model.getConnectorBindingNames();
- for (Iterator mit=cbNames.iterator(); mit.hasNext();) {
- String cbName = (String) mit.next();
- modelIDsCBNames.put(model.getID(), cbName);
-
- }
-
- // Filter connector bindings that we don't want to see in Console
-// if (!HIDDEN_CONNECTORS.contains(cbName)) {
-// }
- }
-
- return modelIDsCBNames;
- }
-
- /**
* Given a routing ID, find all VDBs whose models use the connector binding.
* @param callerSessionID The caller's session ID.
* @param routingID ID of the connector binding.