rapture.common.api.EntitlementApi Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (C) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This is an autogenerated file. You should not edit this file as any changes
* will be overwritten.
*/
package rapture.common.api;
import rapture.common.exception.RaptureException;
import rapture.common.CallingContext;
import java.util.List;
import java.util.Map;
import rapture.common.model.RaptureEntitlement;
import rapture.common.model.RaptureEntitlementGroup;
@SuppressWarnings("all")
public interface EntitlementApi {
/**
* This method is used to retrieve all of the entitlements defined in Rapture.
*
*/
List getEntitlements(CallingContext context);
/**
* Retrieves a single entitlement, or null if not found.
*
*/
RaptureEntitlement getEntitlement(CallingContext context, String entitlementName);
/**
* Retrieves a single entitlement by using its URI.
*
*/
RaptureEntitlement getEntitlementByAddress(CallingContext context, String entitlementURI);
/**
* Retrieves a single entitlement group.
*
*/
RaptureEntitlementGroup getEntitlementGroup(CallingContext context, String groupName);
/**
* Retrieves a single entitlement group from its URI.
*
*/
RaptureEntitlementGroup getEntitlementGroupByAddress(CallingContext context, String groupURI);
/**
* This method returns all of the entitlement groups defined in the Rapture environment.
*
*/
List getEntitlementGroups(CallingContext context);
/**
* This method adds a new entitlement, specifying an initial group that should be assigned
* to this entitlement. The reason for assigning an initial group is to prevent lock
* out.
*
*/
RaptureEntitlement addEntitlement(CallingContext context, String entitlementName, String initialGroup);
/**
* This method is used to add an entitlement group to an entitlement.
*
*/
RaptureEntitlement addGroupToEntitlement(CallingContext context, String entitlementName, String groupName);
/**
* This method reverses the act of adding a group to an entitlement.
*
*/
RaptureEntitlement removeGroupFromEntitlement(CallingContext context, String entitlementName, String groupName);
/**
* This method removes an entitlement entirely from the system.
*
*/
void deleteEntitlement(CallingContext context, String entitlementName);
/**
* This method removes an entitlement group from the system.
*
*/
void deleteEntitlementGroup(CallingContext context, String groupName);
/**
* This method adds a new entitlement group to the system.
*
*/
RaptureEntitlementGroup addEntitlementGroup(CallingContext context, String groupName);
/**
* This method adds a user to an existing entitlement group. The user will then have
* all of the privileges (entitlements) associated with that group.
*
*/
RaptureEntitlementGroup addUserToEntitlementGroup(CallingContext context, String groupName, String userName);
/**
* This method reverses the act of the adding a user to a group.
*
*/
RaptureEntitlementGroup removeUserFromEntitlementGroup(CallingContext context, String groupName, String userName);
/**
* Convenience method to get all the entitlements for a user
*
*/
List findEntitlementsByUser(CallingContext context, String username);
/**
* Convenience method to get all the entitlements for a group
*
*/
List findEntitlementsByGroup(CallingContext context, String groupname);
/**
* Convenience method to get all entitlements for the current user
*
*/
List findEntitlementsBySelf(CallingContext context);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy