com.evolveum.midpoint.model.test
Class AbstractModelIntegrationTest
java.lang.Object
org.springframework.test.context.testng.AbstractTestNGSpringContextTests
com.evolveum.midpoint.test.AbstractIntegrationTest
com.evolveum.midpoint.model.test.AbstractModelIntegrationTest
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.testng.IHookable, org.testng.ITestNGListener
public abstract class AbstractModelIntegrationTest
- extends AbstractIntegrationTest
Abstract framework for an integration test that is placed on top of a model API.
This provides complete environment that the test should need, e.g model service instance, repository, provisionig,
dummy auditing, etc. It also implements lots of useful methods to make writing the tests easier.
- Author:
- Radovan Semancik
Fields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests |
applicationContext, logger |
Method Summary |
protected void |
applyResourceSchema(AccountShadowType accountType,
ResourceType resourceType)
This is not the real thing. |
protected void |
assertAccount(PrismObject<UserType> user,
java.lang.String resourceOid)
|
protected void |
assertAccounts(PrismObject<UserType> user,
int numAccounts)
|
protected void |
assertAccounts(java.lang.String userOid,
int numAccounts)
|
protected void |
assertAssigned(PrismObject<UserType> user,
java.lang.String targetOid,
javax.xml.namespace.QName refType)
|
protected void |
assertAssignedAccount(PrismObject<UserType> user,
java.lang.String resourceOid)
|
protected void |
assertAssignedAccount(java.lang.String userOid,
java.lang.String resourceOid,
Task task,
OperationResult result)
|
protected void |
assertAssignedNo(PrismObject<UserType> user,
javax.xml.namespace.QName refType)
|
protected void |
assertAssignedNoAccount(PrismObject<UserType> user,
java.lang.String resourceOid)
|
protected void |
assertAssignedNoOrg(PrismObject<UserType> user)
|
protected void |
assertAssignedNoOrg(java.lang.String userOid,
Task task,
OperationResult result)
|
protected void |
assertAssignedNoRole(PrismObject<UserType> user)
|
protected void |
assertAssignedNoRole(java.lang.String userOid,
Task task,
OperationResult result)
|
protected void |
assertAssignedOrg(PrismObject<UserType> user,
java.lang.String orgOid)
|
protected void |
assertAssignedOrg(PrismObject<UserType> user,
java.lang.String orgOid,
javax.xml.namespace.QName relation)
|
protected void |
assertAssignedOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
|
protected void |
assertAssignedRole(PrismObject<UserType> user,
java.lang.String roleOid)
|
protected void |
assertAssignedRole(java.lang.String userOid,
java.lang.String roleOid,
Task task,
OperationResult result)
|
protected void |
assertAssignments(PrismObject<UserType> user,
int expectedNumber)
|
protected void |
assertHasNoOrg(PrismObject<UserType> user)
|
protected void |
assertHasOrg(PrismObject<UserType> user,
java.lang.String orgOid)
|
protected void |
assertHasOrg(PrismObject<UserType> user,
java.lang.String orgOid,
javax.xml.namespace.QName relation)
|
protected void |
assertHasOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
|
protected void |
assertHasOrgs(PrismObject<UserType> user,
int expectedNumber)
|
protected void |
assertLinked(PrismObject<UserType> user,
PrismObject<AccountShadowType> account)
|
protected void |
assertLinked(PrismObject<UserType> user,
java.lang.String accountOid)
|
protected void |
assertLinked(java.lang.String userOid,
java.lang.String accountOid)
|
protected void |
assertNoAccountShadow(java.lang.String accountOid)
|
protected void |
assertNoLinkedAccount(PrismObject<UserType> user)
|
protected void |
assertNoShadow(java.lang.String username,
PrismObject<ResourceType> resource,
Task task,
OperationResult result)
|
protected void |
assertNotAssignedRole(PrismObject<UserType> user,
java.lang.String roleOid)
|
protected void |
assertResolvedResourceRefs(ModelContext<UserType,AccountShadowType> context)
|
protected void |
assertShadowModel(PrismObject<AccountShadowType> accountShadow,
java.lang.String oid,
java.lang.String username,
ResourceType resourceType)
|
protected void |
assertShadowRepo(PrismObject<AccountShadowType> accountShadow,
java.lang.String oid,
java.lang.String username,
ResourceType resourceType)
|
protected void |
assertUser(PrismObject<UserType> user,
java.lang.String oid,
java.lang.String name,
java.lang.String fullName,
java.lang.String givenName,
java.lang.String familyName)
|
protected void |
assertUserNoAccountRefs(PrismObject<UserType> user)
|
protected void |
assertUserProperty(PrismObject<UserType> user,
javax.xml.namespace.QName propertyName,
java.lang.Object... expectedPropValues)
|
protected void |
assertUserProperty(java.lang.String userOid,
javax.xml.namespace.QName propertyName,
java.lang.Object... expectedPropValues)
|
protected void |
assertUsers(int expectedNumberOfUsers)
|
protected void |
assignAccount(java.lang.String userOid,
java.lang.String resourceOid,
java.lang.String intent,
Task task,
OperationResult result)
|
protected void |
assignOrg(java.lang.String userOid,
java.lang.String orgOid,
javax.xml.namespace.QName relation,
Task task,
OperationResult result)
|
protected void |
assignOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
|
protected void |
assignRole(java.lang.String userOid,
java.lang.String roleOid,
Task task,
OperationResult result)
|
protected void |
breakAssignmentDelta(java.util.Collection<ObjectDelta<? extends ObjectType>> deltas)
Breaks user assignment delta in the context by inserting some empty value. |
protected void |
breakAssignmentDelta(ObjectDelta<UserType> userDelta)
Breaks user assignment delta in the context by inserting some empty value. |
protected ContainerDelta<AssignmentType> |
createAccountAssignmentModification(java.lang.String resourceOid,
java.lang.String intent,
boolean add)
|
protected ObjectDelta<UserType> |
createAccountAssignmentUserDelta(java.lang.String userOid,
java.lang.String resourceOid,
java.lang.String intent,
boolean add)
|
protected ContainerDelta<AssignmentType> |
createAssignmentModification(java.lang.String roleOid,
javax.xml.namespace.QName refType,
javax.xml.namespace.QName relation,
boolean add)
|
protected ObjectDelta<UserType> |
createAssignmentUserDelta(java.lang.String userOid,
java.lang.String roleOid,
javax.xml.namespace.QName refType,
javax.xml.namespace.QName relation,
boolean add)
|
protected
|
createAttributeAddDelta(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeQName,
T... newRealValue)
|
protected
|
createAttributeAddDelta(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName,
T... newRealValue)
|
protected
|
createAttributeDeleteDelta(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeQName,
T... newRealValue)
|
protected
|
createAttributeDeleteDelta(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName,
T... newRealValue)
|
protected
|
createAttributeReplaceDelta(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeQName,
T... newRealValue)
|
protected
|
createAttributeReplaceDelta(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName,
T... newRealValue)
|
protected ObjectDelta<AccountShadowType> |
createModifyAccountShadowAddDelta(java.lang.String accountOid,
ItemPath propertyName,
java.lang.Object... newRealValue)
|
protected ObjectDelta<AccountShadowType> |
createModifyAccountShadowEmptyDelta(java.lang.String accountOid)
|
protected ObjectDelta<AccountShadowType> |
createModifyAccountShadowReplaceAttributeDelta(java.lang.String accountOid,
PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeName,
java.lang.Object... newRealValue)
|
protected ObjectDelta<AccountShadowType> |
createModifyAccountShadowReplaceAttributeDelta(java.lang.String accountOid,
PrismObject<ResourceType> resource,
java.lang.String attributeName,
java.lang.Object... newRealValue)
|
protected ObjectDelta<AccountShadowType> |
createModifyAccountShadowReplaceDelta(java.lang.String accountOid,
PrismObject<ResourceType> resource,
ItemPath itemPath,
java.lang.Object... newRealValue)
|
protected ObjectDelta<UserType> |
createModifyUserAddAccount(java.lang.String userOid,
PrismObject<ResourceType> resource)
|
protected ObjectDelta<UserType> |
createModifyUserAddDelta(java.lang.String userOid,
ItemPath propertyName,
java.lang.Object... newRealValue)
|
protected ObjectDelta<UserType> |
createModifyUserReplaceDelta(java.lang.String userOid,
ItemPath propertyName,
java.lang.Object... newRealValue)
|
protected ObjectDelta<UserType> |
createModifyUserReplaceDelta(java.lang.String userOid,
javax.xml.namespace.QName propertyName,
java.lang.Object... newRealValue)
|
protected PrismObject<UserType> |
createUser(java.lang.String name,
java.lang.String fullName)
|
protected void |
fillinUser(PrismObject<UserType> user,
java.lang.String name,
java.lang.String fullName)
|
protected void |
fillinUserAssignmentAccountConstruction(PrismObject<UserType> user,
java.lang.String resourceOid)
|
protected PrismObject<AccountShadowType> |
findAccountByUsername(java.lang.String username,
PrismObject<ResourceType> resource)
|
protected PrismObject<AccountShadowType> |
findAccountByUsername(java.lang.String username,
PrismObject<ResourceType> resource,
Task task,
OperationResult result)
|
protected PrismObject<UserType> |
findUserByUsername(java.lang.String username)
|
protected PrismObject<AccountShadowType> |
getAccount(java.lang.String accountOid)
|
protected PrismObject<AccountShadowType> |
getAccount(java.lang.String accountOid,
boolean noFetch)
|
protected PrismObject<AccountShadowType> |
getAccountNoFetch(java.lang.String accountOid)
|
protected PrismObjectDefinition<AccountShadowType> |
getAccountShadowDefinition()
|
protected ResourceAttributeDefinition |
getAttributeDefinition(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeName)
|
protected ItemPath |
getAttributePath(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName)
|
protected javax.xml.namespace.QName |
getAttributeQName(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName)
|
protected ItemPath |
getIcfsNameAttributePath()
|
protected PrismObjectDefinition<ResourceType> |
getResourceDefinition()
|
protected java.lang.String |
getSingleUserAccountRef(PrismObject<UserType> user)
|
protected PrismObject<UserType> |
getUser(java.lang.String userOid)
|
protected java.lang.String |
getUserAccountRef(PrismObject<UserType> user,
java.lang.String resourceOid)
|
protected PrismObjectDefinition<UserType> |
getUserDefinition()
|
protected
|
importAndGetObjectFromFile(java.lang.Class<T> type,
java.lang.String filename,
java.lang.String oid,
Task task,
OperationResult result)
|
protected void |
importObjectFromFile(java.lang.String filename)
|
protected void |
importObjectFromFile(java.lang.String filename,
OperationResult result)
|
void |
initSystem(Task initTask,
OperationResult initResult)
|
protected java.util.Collection<PrismObject<AccountShadowType>> |
listAccounts(PrismObject<ResourceType> resource,
Task task,
OperationResult result)
|
protected void |
modifyAccountShadowReplace(java.lang.String accountOid,
ItemPath propertyPath,
Task task,
OperationResult result,
java.lang.Object... newRealValue)
|
protected void |
modifyUserAssignment(java.lang.String userOid,
java.lang.String roleOid,
javax.xml.namespace.QName refType,
javax.xml.namespace.QName relation,
Task task,
boolean add,
OperationResult result)
|
protected void |
modifyUserReplace(java.lang.String userOid,
ItemPath propertyPath,
Task task,
OperationResult result,
java.lang.Object... newRealValue)
|
protected void |
modifyUserReplace(java.lang.String userOid,
javax.xml.namespace.QName propertyName,
Task task,
OperationResult result,
java.lang.Object... newRealValue)
|
protected void |
purgeResourceSchema(java.lang.String resourceOid)
|
protected java.util.List<PrismObject<OrgType>> |
searchOrg(java.lang.String baseOrgOid,
java.lang.Integer minDepth,
java.lang.Integer maxDepth,
Task task,
OperationResult result)
|
protected void |
setDefaultUserTemplate(java.lang.String userTemplateOid)
|
protected void |
unassignAccount(java.lang.String userOid,
java.lang.String resourceOid,
java.lang.String intent,
Task task,
OperationResult result)
|
protected void |
unassignAll(java.lang.String userOid,
Task task,
OperationResult result)
Executes assignment replace delta with empty values. |
protected void |
unassignOrg(java.lang.String userOid,
java.lang.String orgOid,
javax.xml.namespace.QName relation,
Task task,
OperationResult result)
|
protected void |
unassignOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
|
protected void |
unassignRole(java.lang.String userOid,
java.lang.String roleOid,
Task task,
OperationResult result)
|
protected void |
waitForTaskFinish(java.lang.String taskOid,
boolean checkSubresult)
|
protected void |
waitForTaskFinish(java.lang.String taskOid,
boolean checkSubresult,
int timeout)
|
protected void |
waitForTaskFinish(Task task,
boolean checkSubresult)
|
protected void |
waitForTaskFinish(Task task,
boolean checkSubresult,
int timeout)
|
protected void |
waitForTaskNextRun(java.lang.String taskOid,
boolean checkSubresult)
|
protected void |
waitForTaskNextRun(java.lang.String taskOid,
boolean checkSubresult,
int timeout)
|
protected void |
waitForTaskStart(java.lang.String taskOid,
boolean checkSubresult)
|
protected void |
waitForTaskStart(java.lang.String taskOid,
boolean checkSubresult,
int timeout)
|
Methods inherited from class com.evolveum.midpoint.test.AbstractIntegrationTest |
addObject, addObjectFromFile, addObjectsFromFile, addResourceFromFile, applySyncSettings, assertNoRepoCache, assumeAssignmentPolicy, fillInConnectorRef, findConnectorByType, findConnectorByTypeAndVersion, getAssignmentPolicyEnforcementType, getSystemConfiguration, initSystemConditional, isSystemInitialized, parseObjectType, parseObjectType, parseObjectTypeFromFile, unmarshallJaxbFromFile, unmarshallJaxbFromFile |
Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests |
run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TASK_WAIT_TIMEOUT
protected static final int DEFAULT_TASK_WAIT_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_TASK_SLEEP_TIME
protected static final long DEFAULT_TASK_SLEEP_TIME
- See Also:
- Constant Field Values
CONNECTOR_DUMMY_TYPE
protected static final java.lang.String CONNECTOR_DUMMY_TYPE
- See Also:
- Constant Field Values
modelService
@Autowired(required=true)
protected ModelService modelService
modelInteractionService
@Autowired(required=true)
protected ModelInteractionService modelInteractionService
modelWeb
@Autowired(required=true)
protected ModelPortType modelWeb
repositoryService
@Autowired(required=true)
protected RepositoryService repositoryService
provisioningService
@Autowired(required=true)
protected ProvisioningService provisioningService
hookRegistry
@Autowired(required=true)
protected HookRegistry hookRegistry
prismContext
@Autowired(required=true)
protected PrismContext prismContext
dummyAuditService
protected DummyAuditService dummyAuditService
verbose
protected boolean verbose
AbstractModelIntegrationTest
public AbstractModelIntegrationTest()
initSystem
public void initSystem(Task initTask,
OperationResult initResult)
throws java.lang.Exception
- Specified by:
initSystem
in class AbstractIntegrationTest
- Throws:
java.lang.Exception
importObjectFromFile
protected void importObjectFromFile(java.lang.String filename)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
importObjectFromFile
protected void importObjectFromFile(java.lang.String filename,
OperationResult result)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
importAndGetObjectFromFile
protected <T extends ObjectType> PrismObject<T> importAndGetObjectFromFile(java.lang.Class<T> type,
java.lang.String filename,
java.lang.String oid,
Task task,
OperationResult result)
throws java.io.FileNotFoundException,
ObjectNotFoundException,
SchemaException,
SecurityViolationException
- Throws:
java.io.FileNotFoundException
ObjectNotFoundException
SchemaException
SecurityViolationException
applyResourceSchema
protected void applyResourceSchema(AccountShadowType accountType,
ResourceType resourceType)
throws SchemaException
- This is not the real thing. It is just for the tests.
- Throws:
SchemaException
assertUsers
protected void assertUsers(int expectedNumberOfUsers)
throws SchemaException,
ObjectNotFoundException,
SecurityViolationException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
SecurityViolationException
CommunicationException
ConfigurationException
assertUser
protected void assertUser(PrismObject<UserType> user,
java.lang.String oid,
java.lang.String name,
java.lang.String fullName,
java.lang.String givenName,
java.lang.String familyName)
assertUserProperty
protected void assertUserProperty(java.lang.String userOid,
javax.xml.namespace.QName propertyName,
java.lang.Object... expectedPropValues)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertUserProperty
protected void assertUserProperty(PrismObject<UserType> user,
javax.xml.namespace.QName propertyName,
java.lang.Object... expectedPropValues)
assertLinked
protected void assertLinked(java.lang.String userOid,
java.lang.String accountOid)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertLinked
protected void assertLinked(PrismObject<UserType> user,
PrismObject<AccountShadowType> account)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertLinked
protected void assertLinked(PrismObject<UserType> user,
java.lang.String accountOid)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertNoLinkedAccount
protected void assertNoLinkedAccount(PrismObject<UserType> user)
assertAccount
protected void assertAccount(PrismObject<UserType> user,
java.lang.String resourceOid)
throws ObjectNotFoundException,
SchemaException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
SecurityViolationException
assertAccounts
protected void assertAccounts(java.lang.String userOid,
int numAccounts)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertAccounts
protected void assertAccounts(PrismObject<UserType> user,
int numAccounts)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
createModifyUserReplaceDelta
protected ObjectDelta<UserType> createModifyUserReplaceDelta(java.lang.String userOid,
javax.xml.namespace.QName propertyName,
java.lang.Object... newRealValue)
createModifyUserReplaceDelta
protected ObjectDelta<UserType> createModifyUserReplaceDelta(java.lang.String userOid,
ItemPath propertyName,
java.lang.Object... newRealValue)
createModifyUserAddDelta
protected ObjectDelta<UserType> createModifyUserAddDelta(java.lang.String userOid,
ItemPath propertyName,
java.lang.Object... newRealValue)
createModifyUserAddAccount
protected ObjectDelta<UserType> createModifyUserAddAccount(java.lang.String userOid,
PrismObject<ResourceType> resource)
throws SchemaException
- Throws:
SchemaException
createModifyAccountShadowEmptyDelta
protected ObjectDelta<AccountShadowType> createModifyAccountShadowEmptyDelta(java.lang.String accountOid)
createModifyAccountShadowReplaceAttributeDelta
protected ObjectDelta<AccountShadowType> createModifyAccountShadowReplaceAttributeDelta(java.lang.String accountOid,
PrismObject<ResourceType> resource,
java.lang.String attributeName,
java.lang.Object... newRealValue)
throws SchemaException,
ObjectNotFoundException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
createModifyAccountShadowReplaceAttributeDelta
protected ObjectDelta<AccountShadowType> createModifyAccountShadowReplaceAttributeDelta(java.lang.String accountOid,
PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeName,
java.lang.Object... newRealValue)
throws SchemaException,
ObjectNotFoundException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
createModifyAccountShadowReplaceDelta
protected ObjectDelta<AccountShadowType> createModifyAccountShadowReplaceDelta(java.lang.String accountOid,
PrismObject<ResourceType> resource,
ItemPath itemPath,
java.lang.Object... newRealValue)
throws SchemaException,
ObjectNotFoundException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
createAttributeReplaceDelta
protected <T> PropertyDelta<T> createAttributeReplaceDelta(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName,
T... newRealValue)
throws SchemaException
- Throws:
SchemaException
createAttributeReplaceDelta
protected <T> PropertyDelta<T> createAttributeReplaceDelta(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeQName,
T... newRealValue)
throws SchemaException
- Throws:
SchemaException
createAttributeAddDelta
protected <T> PropertyDelta<T> createAttributeAddDelta(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName,
T... newRealValue)
throws SchemaException
- Throws:
SchemaException
createAttributeAddDelta
protected <T> PropertyDelta<T> createAttributeAddDelta(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeQName,
T... newRealValue)
throws SchemaException
- Throws:
SchemaException
createAttributeDeleteDelta
protected <T> PropertyDelta<T> createAttributeDeleteDelta(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName,
T... newRealValue)
throws SchemaException
- Throws:
SchemaException
createAttributeDeleteDelta
protected <T> PropertyDelta<T> createAttributeDeleteDelta(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeQName,
T... newRealValue)
throws SchemaException
- Throws:
SchemaException
getAttributeDefinition
protected ResourceAttributeDefinition getAttributeDefinition(PrismObject<ResourceType> resource,
javax.xml.namespace.QName attributeName)
throws SchemaException
- Throws:
SchemaException
createModifyAccountShadowAddDelta
protected ObjectDelta<AccountShadowType> createModifyAccountShadowAddDelta(java.lang.String accountOid,
ItemPath propertyName,
java.lang.Object... newRealValue)
modifyUserReplace
protected void modifyUserReplace(java.lang.String userOid,
javax.xml.namespace.QName propertyName,
Task task,
OperationResult result,
java.lang.Object... newRealValue)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
modifyUserReplace
protected void modifyUserReplace(java.lang.String userOid,
ItemPath propertyPath,
Task task,
OperationResult result,
java.lang.Object... newRealValue)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
modifyAccountShadowReplace
protected void modifyAccountShadowReplace(java.lang.String accountOid,
ItemPath propertyPath,
Task task,
OperationResult result,
java.lang.Object... newRealValue)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
assignRole
protected void assignRole(java.lang.String userOid,
java.lang.String roleOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
unassignRole
protected void unassignRole(java.lang.String userOid,
java.lang.String roleOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
assignOrg
protected void assignOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
assignOrg
protected void assignOrg(java.lang.String userOid,
java.lang.String orgOid,
javax.xml.namespace.QName relation,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
unassignOrg
protected void unassignOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
unassignOrg
protected void unassignOrg(java.lang.String userOid,
java.lang.String orgOid,
javax.xml.namespace.QName relation,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
modifyUserAssignment
protected void modifyUserAssignment(java.lang.String userOid,
java.lang.String roleOid,
javax.xml.namespace.QName refType,
javax.xml.namespace.QName relation,
Task task,
boolean add,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
unassignAll
protected void unassignAll(java.lang.String userOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
ObjectAlreadyExistsException,
PolicyViolationException,
SecurityViolationException
- Executes assignment replace delta with empty values.
- Throws:
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
ObjectAlreadyExistsException
PolicyViolationException
SecurityViolationException
createAssignmentModification
protected ContainerDelta<AssignmentType> createAssignmentModification(java.lang.String roleOid,
javax.xml.namespace.QName refType,
javax.xml.namespace.QName relation,
boolean add)
throws SchemaException
- Throws:
SchemaException
createAssignmentUserDelta
protected ObjectDelta<UserType> createAssignmentUserDelta(java.lang.String userOid,
java.lang.String roleOid,
javax.xml.namespace.QName refType,
javax.xml.namespace.QName relation,
boolean add)
throws SchemaException
- Throws:
SchemaException
createAccountAssignmentModification
protected ContainerDelta<AssignmentType> createAccountAssignmentModification(java.lang.String resourceOid,
java.lang.String intent,
boolean add)
throws SchemaException
- Throws:
SchemaException
createAccountAssignmentUserDelta
protected ObjectDelta<UserType> createAccountAssignmentUserDelta(java.lang.String userOid,
java.lang.String resourceOid,
java.lang.String intent,
boolean add)
throws SchemaException
- Throws:
SchemaException
assignAccount
protected void assignAccount(java.lang.String userOid,
java.lang.String resourceOid,
java.lang.String intent,
Task task,
OperationResult result)
throws SchemaException,
ObjectAlreadyExistsException,
ObjectNotFoundException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
PolicyViolationException,
SecurityViolationException
- Throws:
SchemaException
ObjectAlreadyExistsException
ObjectNotFoundException
ExpressionEvaluationException
CommunicationException
ConfigurationException
PolicyViolationException
SecurityViolationException
unassignAccount
protected void unassignAccount(java.lang.String userOid,
java.lang.String resourceOid,
java.lang.String intent,
Task task,
OperationResult result)
throws SchemaException,
ObjectAlreadyExistsException,
ObjectNotFoundException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
PolicyViolationException,
SecurityViolationException
- Throws:
SchemaException
ObjectAlreadyExistsException
ObjectNotFoundException
ExpressionEvaluationException
CommunicationException
ConfigurationException
PolicyViolationException
SecurityViolationException
getUser
protected PrismObject<UserType> getUser(java.lang.String userOid)
throws ObjectNotFoundException,
SchemaException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
SecurityViolationException
findUserByUsername
protected PrismObject<UserType> findUserByUsername(java.lang.String username)
throws SchemaException,
ObjectNotFoundException,
SecurityViolationException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
SecurityViolationException
CommunicationException
ConfigurationException
findAccountByUsername
protected PrismObject<AccountShadowType> findAccountByUsername(java.lang.String username,
PrismObject<ResourceType> resource)
throws SchemaException,
ObjectNotFoundException,
SecurityViolationException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
SecurityViolationException
CommunicationException
ConfigurationException
findAccountByUsername
protected PrismObject<AccountShadowType> findAccountByUsername(java.lang.String username,
PrismObject<ResourceType> resource,
Task task,
OperationResult result)
throws SchemaException,
ObjectNotFoundException,
SecurityViolationException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
SecurityViolationException
CommunicationException
ConfigurationException
listAccounts
protected java.util.Collection<PrismObject<AccountShadowType>> listAccounts(PrismObject<ResourceType> resource,
Task task,
OperationResult result)
throws SchemaException,
ObjectNotFoundException,
SecurityViolationException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
SecurityViolationException
CommunicationException
ConfigurationException
getAccount
protected PrismObject<AccountShadowType> getAccount(java.lang.String accountOid)
throws ObjectNotFoundException,
SchemaException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
SecurityViolationException
getAccountNoFetch
protected PrismObject<AccountShadowType> getAccountNoFetch(java.lang.String accountOid)
throws ObjectNotFoundException,
SchemaException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
SecurityViolationException
getAccount
protected PrismObject<AccountShadowType> getAccount(java.lang.String accountOid,
boolean noFetch)
throws ObjectNotFoundException,
SchemaException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
SecurityViolationException
assertNoShadow
protected void assertNoShadow(java.lang.String username,
PrismObject<ResourceType> resource,
Task task,
OperationResult result)
throws SchemaException,
ObjectNotFoundException,
SecurityViolationException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
SecurityViolationException
CommunicationException
ConfigurationException
getSingleUserAccountRef
protected java.lang.String getSingleUserAccountRef(PrismObject<UserType> user)
getUserAccountRef
protected java.lang.String getUserAccountRef(PrismObject<UserType> user,
java.lang.String resourceOid)
throws ObjectNotFoundException,
SchemaException,
SecurityViolationException
- Throws:
ObjectNotFoundException
SchemaException
SecurityViolationException
assertUserNoAccountRefs
protected void assertUserNoAccountRefs(PrismObject<UserType> user)
assertNoAccountShadow
protected void assertNoAccountShadow(java.lang.String accountOid)
throws SchemaException
- Throws:
SchemaException
assertAssignedRole
protected void assertAssignedRole(java.lang.String userOid,
java.lang.String roleOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertAssignedRole
protected void assertAssignedRole(PrismObject<UserType> user,
java.lang.String roleOid)
assertNotAssignedRole
protected void assertNotAssignedRole(PrismObject<UserType> user,
java.lang.String roleOid)
assertAssignedOrg
protected void assertAssignedOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertAssignedOrg
protected void assertAssignedOrg(PrismObject<UserType> user,
java.lang.String orgOid,
javax.xml.namespace.QName relation)
assertAssignedOrg
protected void assertAssignedOrg(PrismObject<UserType> user,
java.lang.String orgOid)
assertHasOrg
protected void assertHasOrg(java.lang.String userOid,
java.lang.String orgOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertHasOrg
protected void assertHasOrg(PrismObject<UserType> user,
java.lang.String orgOid)
assertHasOrg
protected void assertHasOrg(PrismObject<UserType> user,
java.lang.String orgOid,
javax.xml.namespace.QName relation)
assertHasNoOrg
protected void assertHasNoOrg(PrismObject<UserType> user)
assertHasOrgs
protected void assertHasOrgs(PrismObject<UserType> user,
int expectedNumber)
assertAssignments
protected void assertAssignments(PrismObject<UserType> user,
int expectedNumber)
assertAssigned
protected void assertAssigned(PrismObject<UserType> user,
java.lang.String targetOid,
javax.xml.namespace.QName refType)
assertAssignedNoOrg
protected void assertAssignedNoOrg(java.lang.String userOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertAssignedNoOrg
protected void assertAssignedNoOrg(PrismObject<UserType> user)
assertAssignedNoRole
protected void assertAssignedNoRole(java.lang.String userOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertAssignedNoRole
protected void assertAssignedNoRole(PrismObject<UserType> user)
assertAssignedNo
protected void assertAssignedNo(PrismObject<UserType> user,
javax.xml.namespace.QName refType)
assertAssignedAccount
protected void assertAssignedAccount(java.lang.String userOid,
java.lang.String resourceOid,
Task task,
OperationResult result)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertAssignedAccount
protected void assertAssignedAccount(PrismObject<UserType> user,
java.lang.String resourceOid)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
assertAssignedNoAccount
protected void assertAssignedNoAccount(PrismObject<UserType> user,
java.lang.String resourceOid)
throws ObjectNotFoundException,
SchemaException
- Throws:
ObjectNotFoundException
SchemaException
getUserDefinition
protected PrismObjectDefinition<UserType> getUserDefinition()
getResourceDefinition
protected PrismObjectDefinition<ResourceType> getResourceDefinition()
getAccountShadowDefinition
protected PrismObjectDefinition<AccountShadowType> getAccountShadowDefinition()
createUser
protected PrismObject<UserType> createUser(java.lang.String name,
java.lang.String fullName)
throws SchemaException
- Throws:
SchemaException
fillinUser
protected void fillinUser(PrismObject<UserType> user,
java.lang.String name,
java.lang.String fullName)
fillinUserAssignmentAccountConstruction
protected void fillinUserAssignmentAccountConstruction(PrismObject<UserType> user,
java.lang.String resourceOid)
setDefaultUserTemplate
protected void setDefaultUserTemplate(java.lang.String userTemplateOid)
throws ObjectNotFoundException,
SchemaException,
ObjectAlreadyExistsException
- Throws:
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException
getIcfsNameAttributePath
protected ItemPath getIcfsNameAttributePath()
assertResolvedResourceRefs
protected void assertResolvedResourceRefs(ModelContext<UserType,AccountShadowType> context)
breakAssignmentDelta
protected void breakAssignmentDelta(java.util.Collection<ObjectDelta<? extends ObjectType>> deltas)
throws SchemaException
- Breaks user assignment delta in the context by inserting some empty value. This may interfere with comparing the values to
existing user values.
- Throws:
SchemaException
breakAssignmentDelta
protected void breakAssignmentDelta(ObjectDelta<UserType> userDelta)
throws SchemaException
- Breaks user assignment delta in the context by inserting some empty value. This may interfere with comparing the values to
existing user values.
- Throws:
SchemaException
purgeResourceSchema
protected void purgeResourceSchema(java.lang.String resourceOid)
throws ObjectAlreadyExistsException,
ObjectNotFoundException,
SchemaException,
ExpressionEvaluationException,
CommunicationException,
ConfigurationException,
PolicyViolationException,
SecurityViolationException
- Throws:
ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
ExpressionEvaluationException
CommunicationException
ConfigurationException
PolicyViolationException
SecurityViolationException
searchOrg
protected java.util.List<PrismObject<OrgType>> searchOrg(java.lang.String baseOrgOid,
java.lang.Integer minDepth,
java.lang.Integer maxDepth,
Task task,
OperationResult result)
throws SchemaException,
ObjectNotFoundException,
SecurityViolationException,
CommunicationException,
ConfigurationException
- Throws:
SchemaException
ObjectNotFoundException
SecurityViolationException
CommunicationException
ConfigurationException
assertShadowRepo
protected void assertShadowRepo(PrismObject<AccountShadowType> accountShadow,
java.lang.String oid,
java.lang.String username,
ResourceType resourceType)
assertShadowModel
protected void assertShadowModel(PrismObject<AccountShadowType> accountShadow,
java.lang.String oid,
java.lang.String username,
ResourceType resourceType)
getAttributeQName
protected javax.xml.namespace.QName getAttributeQName(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName)
getAttributePath
protected ItemPath getAttributePath(PrismObject<ResourceType> resource,
java.lang.String attributeLocalName)
waitForTaskFinish
protected void waitForTaskFinish(Task task,
boolean checkSubresult)
throws java.lang.Exception
- Throws:
java.lang.Exception
waitForTaskFinish
protected void waitForTaskFinish(Task task,
boolean checkSubresult,
int timeout)
throws java.lang.Exception
- Throws:
java.lang.Exception
waitForTaskFinish
protected void waitForTaskFinish(java.lang.String taskOid,
boolean checkSubresult)
throws java.lang.Exception
- Throws:
java.lang.Exception
waitForTaskFinish
protected void waitForTaskFinish(java.lang.String taskOid,
boolean checkSubresult,
int timeout)
throws java.lang.Exception
- Throws:
java.lang.Exception
waitForTaskStart
protected void waitForTaskStart(java.lang.String taskOid,
boolean checkSubresult)
throws java.lang.Exception
- Throws:
java.lang.Exception
waitForTaskStart
protected void waitForTaskStart(java.lang.String taskOid,
boolean checkSubresult,
int timeout)
throws java.lang.Exception
- Throws:
java.lang.Exception
waitForTaskNextRun
protected void waitForTaskNextRun(java.lang.String taskOid,
boolean checkSubresult)
throws java.lang.Exception
- Throws:
java.lang.Exception
waitForTaskNextRun
protected void waitForTaskNextRun(java.lang.String taskOid,
boolean checkSubresult,
int timeout)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2012 evolveum. All Rights Reserved.