• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java AuthorizationConstants类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.kuali.rice.kns.authorization.AuthorizationConstants的典型用法代码示例。如果您正苦于以下问题:Java AuthorizationConstants类的具体用法?Java AuthorizationConstants怎么用?Java AuthorizationConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

AuthorizationConstants类属于org.kuali.rice.kns.authorization包,在下文中一共展示了AuthorizationConstants类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: assertCorrectLocksAreInPlace

点赞 3

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * A convenience method for checking to ensure that the proper pessimistic locks are in place.
 * 
 * @param latestUserHasFullEntry Indicates if the map returned by PessimisticLockService.establishLocks should have a true "fullEntry" parameter.
 * @param finalModes The map returned by the call to PessimisticLockService.establishLocks. This parameter can be null if checking it is not needed.
 * @param expectedLockQuantity The expected number of pessimistic locks.
 * @param pessimisticLocks The list of pessimistic locks to check for proper quantity and proper state.
 * @param expectedOwners The users who are expected to own the corresponding locks in the previous list.
 * @param expectedDescriptors The expected lock descriptors for the corresponding locks in the other list. This parameter can be set to null if
 * the pessimistic locks are not using custom lock descriptors or if custom lock descriptors are not the concern of the test.
 * @throws Exception
 */
private void assertCorrectLocksAreInPlace(boolean latestUserHasFullEntry, Map<?,?> finalModes, int expectedLockQuantity,
		List<PessimisticLock> pessimisticLocks, Person[] expectedOwners, String[] expectedDescriptors) throws Exception {
	// Ensure that the last user to attempt to establish locks has the expected finalModes entry (or lack of it).
	if (finalModes != null) {
		assertEquals("The last user that tried to establish locks does not have the expected status on their full entry privileges",
				latestUserHasFullEntry, StringUtils.equalsIgnoreCase(KRADConstants.KUALI_DEFAULT_TRUE_VALUE, (String)(finalModes.get(
                AuthorizationConstants.EditMode.FULL_ENTRY))));
	}
	// Ensure that the expected number of locks are present.
	assertEquals("The wrong number of pessimistic locks are in place", expectedLockQuantity, pessimisticLocks.size());
	// Verify that each lock has the expected owners.
	for (int i = pessimisticLocks.size() - 1; i > -1; i--) {
		assertTrue("The lock at index " + i + " did not have the expected owner of " + expectedOwners[i].getPrincipalName(),
			pessimisticLocks.get(i).isOwnedByUser(expectedOwners[i]));
		if (expectedDescriptors != null) {
			assertTrue("The lock at index " + i + " did not have the expected lock descriptor of " + expectedDescriptors[i],
					pessimisticLocks.get(i).getLockDescriptor().equals(expectedDescriptors[i]));
		}
	}
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:33,
代码来源:PessimisticLockServiceTest.java

示例2: testWorkflowPessimisticLocking

点赞 3

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * tests the PessimistLockService's workflow pessimistic locking capabilities
 * 
 * @throws Exception
 */
@Test
public void testWorkflowPessimisticLocking() throws Exception {
	PessimisticLockService lockService = KRADServiceLocatorWeb.getPessimisticLockService();
	AccountRequestDocument accountDoc = (AccountRequestDocument) KRADServiceLocatorWeb.getDocumentService().getNewDocument("AccountRequest");
	assertTrue("The AccountRequestDocument should be using pessimistic locking",
			KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry(accountDoc.getClass().getName()).getUsePessimisticLocking());
	
	// Have the system user create a workflow pessimistic lock.
	UserSession systemSession = new UserSession(KRADConstants.SYSTEM_USER);
	Person[] systemPerson = { systemSession.getPerson() };
	lockService.establishWorkflowPessimisticLocking(accountDoc);
   	assertCorrectLocksAreInPlace(false, null, 1, accountDoc.getPessimisticLocks(), systemPerson, null);
   	
   	// Make sure that no other users can lock when the workflow lock is in place.
   	UserSession adminSession = new UserSession("admin");
	Map<String,String> editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	Map<?,?> finalModes = lockService.establishLocks(accountDoc, editMode, adminSession.getPerson());
	assertCorrectLocksAreInPlace(false, finalModes, 1, accountDoc.getPessimisticLocks(), systemPerson, null);
   	
   	// Ensure that workflow pessimistic locks can also be released.
   	lockService.releaseWorkflowPessimisticLocking(accountDoc);
   	assertTrue("There should not be any pessimistic locks present on the document", accountDoc.getPessimisticLocks().isEmpty());
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:30,
代码来源:PessimisticLockServiceTest.java

示例3: assertCorrectLocksAreInPlace

点赞 3

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * A convenience method for checking to ensure that the proper pessimistic locks are in place.
 *
 * @param latestUserHasFullEntry Indicates if the map returned by PessimisticLockService.establishLocks should have a true "fullEntry" parameter.
 * @param finalModes The map returned by the call to PessimisticLockService.establishLocks. This parameter can be null if checking it is not needed.
 * @param expectedLockQuantity The expected number of pessimistic locks.
 * @param pessimisticLocks The list of pessimistic locks to check for proper quantity and proper state.
 * @param expectedOwners The users who are expected to own the corresponding locks in the previous list.
 * @param expectedDescriptors The expected lock descriptors for the corresponding locks in the other list. This parameter can be set to null if
 * the pessimistic locks are not using custom lock descriptors or if custom lock descriptors are not the concern of the test.
 * @throws Exception
 */
private void assertCorrectLocksAreInPlace(boolean latestUserHasFullEntry, Map<?,?> finalModes, int expectedLockQuantity,
		List<PessimisticLock> pessimisticLocks, Person[] expectedOwners, String[] expectedDescriptors) throws Exception {
	// Ensure that the last user to attempt to establish locks has the expected finalModes entry (or lack of it).
	if (finalModes != null) {
		assertEquals("The last user that tried to establish locks does not have the expected status on their full entry privileges",
				latestUserHasFullEntry, StringUtils.equalsIgnoreCase(KRADConstants.KUALI_DEFAULT_TRUE_VALUE, (String)(finalModes.get(
                AuthorizationConstants.EditMode.FULL_ENTRY))));
	}
	// Ensure that the expected number of locks are present.
	assertEquals("The wrong number of pessimistic locks are in place", expectedLockQuantity, pessimisticLocks.size());
	// Verify that each lock has the expected owners.
	for (int i = pessimisticLocks.size() - 1; i > -1; i--) {
		assertTrue("The lock at index " + i + " did not have the expected owner of " + expectedOwners[i].getPrincipalName(),
			pessimisticLocks.get(i).isOwnedByUser(expectedOwners[i]));
		if (expectedDescriptors != null) {
			assertTrue("The lock at index " + i + " did not have the expected lock descriptor of " + expectedDescriptors[i],
					pessimisticLocks.get(i).getLockDescriptor().equals(expectedDescriptors[i]));
		}
	}
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:33,
代码来源:PessimisticLockServiceTest.java

示例4: assertCorrectLocksAreInPlace

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * A convenience method for checking to ensure that the proper pessimistic locks are in place.
 *
 * @param latestUserHasFullEntry Indicates if the map returned by PessimisticLockService.establishLocks should have
 * a true "fullEntry" parameter.
 * @param finalModes The map returned by the call to PessimisticLockService.establishLocks. This parameter can be
 * null if checking it is not needed.
 * @param expectedLockQuantity The expected number of pessimistic locks.
 * @param pessimisticLocks The list of pessimistic locks to check for proper quantity and proper state.
 * @param expectedOwners The users who are expected to own the corresponding locks in the previous list.
 * @param expectedDescriptors The expected lock descriptors for the corresponding locks in the other list. This
 * parameter can be set to null if
 * the pessimistic locks are not using custom lock descriptors or if custom lock descriptors are not the concern of
 * the test.
 * @throws Exception
 */
private void assertCorrectLocksAreInPlace(boolean latestUserHasFullEntry, Map<?, ?> finalModes,
        int expectedLockQuantity, List<PessimisticLock> pessimisticLocks, Person[] expectedOwners,
        String[] expectedDescriptors) throws Exception {
    // Ensure that the last user to attempt to establish locks has the expected finalModes entry (or lack of it).
    if (finalModes != null) {
        assertEquals(
                "The last user that tried to establish locks does not have the expected status on their full entry privileges",
                latestUserHasFullEntry, StringUtils.equalsIgnoreCase(KRADConstants.KUALI_DEFAULT_TRUE_VALUE,
                (String) (finalModes.get(AuthorizationConstants.EditMode.FULL_ENTRY))));
    }
    // Ensure that the expected number of locks are present.
    assertEquals("The wrong number of pessimistic locks are in place", expectedLockQuantity,
            pessimisticLocks.size());
    // Verify that each lock has the expected owners.
    for (int i = pessimisticLocks.size() - 1; i > -1; i--) {
        assertTrue("The lock at index " + i + " did not have the expected owner of " + expectedOwners[i]
                .getPrincipalName(), pessimisticLocks.get(i).isOwnedByUser(expectedOwners[i]));
        if (expectedDescriptors != null) {
            assertTrue("The lock at index "
                    + i
                    + " did not have the expected lock descriptor of "
                    + expectedDescriptors[i], pessimisticLocks.get(i).getLockDescriptor().equals(
                    expectedDescriptors[i]));
        }
    }
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:43,
代码来源:PessimisticLockServiceTest.java

示例5: restoreSystemAndEditMethod

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * This method restores the system and edit method to the selected values when the last call to the selectSystemAndMethod action
 * was made
 *
 * @param correctionForm
 * @return if the system and edit method were changed while not in read only mode and the selectSystemEditMethod method was not
 *         being called if true, this is ususally not a good condition
 */
protected boolean restoreSystemAndEditMethod(CorrectionForm correctionForm) {
    boolean readOnly = correctionForm.getEditingMode().get(AuthorizationConstants.EditMode.FULL_ENTRY) != null;
    if (!"selectSystemEditMethod".equals(correctionForm.getMethodToCall()) && !readOnly) {
        if (!StringUtils.equals(correctionForm.getPreviousEditMethod(), correctionForm.getEditMethod()) || !StringUtils.equals(correctionForm.getPreviousChooseSystem(), correctionForm.getChooseSystem())) {
            correctionForm.setChooseSystem(correctionForm.getPreviousChooseSystem());
            correctionForm.setEditMethod(correctionForm.getPreviousEditMethod());
            GlobalVariables.getMessageMap().putError(SYSTEM_AND_EDIT_METHOD_ERROR_KEY, OLEKeyConstants.ERROR_GL_ERROR_CORRECTION_INVALID_SYSTEM_OR_EDIT_METHOD_CHANGE);
            return true;
        }
    }
    return false;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:21,
代码来源:CorrectionAction.java

示例6: restoreSystemAndEditMethod

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * This method restores the system and edit method to the selected values when the last call to the selectSystemAndMethod action
 * was made
 * 
 * @param correctionForm
 * @return if the system and edit method were changed while not in read only mode and the selectSystemEditMethod method was not
 *         being called if true, this is ususally not a good condition
 */
protected boolean restoreSystemAndEditMethod(CorrectionForm correctionForm) {
    boolean readOnly = correctionForm.getEditingMode().get(AuthorizationConstants.EditMode.FULL_ENTRY) != null;
    if (!"selectSystemEditMethod".equals(correctionForm.getMethodToCall()) && !readOnly) {
        if (!StringUtils.equals(correctionForm.getPreviousEditMethod(), correctionForm.getEditMethod()) || !StringUtils.equals(correctionForm.getPreviousChooseSystem(), correctionForm.getChooseSystem())) {
            correctionForm.setChooseSystem(correctionForm.getPreviousChooseSystem());
            correctionForm.setEditMethod(correctionForm.getPreviousEditMethod());
            GlobalVariables.getMessageMap().putError(SYSTEM_AND_EDIT_METHOD_ERROR_KEY, KFSKeyConstants.ERROR_GL_ERROR_CORRECTION_INVALID_SYSTEM_OR_EDIT_METHOD_CHANGE);
            return true;
        }
    }
    return false;
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:21,
代码来源:CorrectionAction.java

示例7: testEstablishLocks

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * tests the PessimisticLockService.establishLocks method and the PessimisticLockService.getDocumentActions method
 * 
 * @throws Exception
 */
@Test
@Deprecated
public void testEstablishLocks() throws Exception {
	PessimisticLockService lockService = KRADServiceLocatorWeb.getPessimisticLockService();
	AccountRequestDocument accountDoc = (AccountRequestDocument) KRADServiceLocatorWeb.getDocumentService().getNewDocument("AccountRequest");
	
	assertTrue("The AccountRequestDocument should be using pessimistic locking",
			KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry(accountDoc.getClass().getName()).getUsePessimisticLocking());
	
	// Have "quickstart" establish a pessimistic lock on the account request document.
	UserSession quickstartSession = new UserSession("quickstart");
	Person[] quickstartPerson = { quickstartSession.getPerson() };
	Map<String,String> editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	Map <?,?> finalModes = lockService.establishLocks(accountDoc, editMode, quickstartSession.getPerson());
	
	// Verify that the lock was actually established.
	assertCorrectLocksAreInPlace(true, finalModes, 1, accountDoc.getPessimisticLocks(), quickstartPerson, null);
	
	// Now check to make sure that a different user (such as "admin") cannot save, route, cancel, or blanket approve the document.
	UserSession adminSession = new UserSession("admin");
	Set<String> documentActions = new HashSet<String>(Arrays.asList(new String[] { KRADConstants.KUALI_ACTION_CAN_CANCEL,
			KRADConstants.KUALI_ACTION_CAN_SAVE, KRADConstants.KUALI_ACTION_CAN_ROUTE, KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE }));
	Set<?> finalActions = lockService.getDocumentActions(accountDoc, adminSession.getPerson(), documentActions);
	assertFalse("'admin' should not be able to cancel the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_CANCEL));
	assertFalse("'admin' should not be able to save the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_SAVE));
	assertFalse("'admin' should not be able to route the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_ROUTE));
	assertFalse("'admin' should not be able to blanket approve the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE));
	
	// Verify that "quickstart" can save, route, and cancel the document since he is the owner of the lock.
	documentActions = new HashSet<String>(Arrays.asList(new String[] {
			KRADConstants.KUALI_ACTION_CAN_CANCEL, KRADConstants.KUALI_ACTION_CAN_SAVE, KRADConstants.KUALI_ACTION_CAN_ROUTE }));
	finalActions = lockService.getDocumentActions(accountDoc, quickstartSession.getPerson(), documentActions);
	assertTrue("'quickstart' should have had cancel privileges", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_CANCEL));
	assertTrue("'quickstart' should have had save privileges", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_SAVE));
	assertTrue("'quickstart' should have had route privileges", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_ROUTE));
	
	// Check that "admin" cannot establish a lock when one is already in place.
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	finalModes = lockService.establishLocks(accountDoc, editMode, adminSession.getPerson());
	assertCorrectLocksAreInPlace(false, finalModes, 1, accountDoc.getPessimisticLocks(), quickstartPerson, null);
	
	// Make sure that "quickstart" cannot create a second lock if custom lock descriptors are not in use.
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	finalModes = lockService.establishLocks(accountDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(true, finalModes, 1, accountDoc.getPessimisticLocks(), quickstartPerson, null);

    // Release lock for "quickstart" for additional testing
    lockService.releaseAllLocksForUser(accountDoc.getPessimisticLocks(), quickstartSession.getPerson());
    accountDoc.refreshPessimisticLocks();

    // Have the system user create a workflow pessimistic lock.
    UserSession systemSession = new UserSession(KRADConstants.SYSTEM_USER);
    Person[] systemPerson = { systemSession.getPerson() };
    lockService.establishWorkflowPessimisticLocking(accountDoc);
    assertCorrectLocksAreInPlace(false, null, 1, accountDoc.getPessimisticLocks(), systemPerson, null);

    // Make sure that no other users can lock when the workflow lock is in place.
    editMode = new HashMap<String,String>();
    editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
    finalModes = lockService.establishLocks(accountDoc, editMode, adminSession.getPerson());
    assertCorrectLocksAreInPlace(false, finalModes, 1, accountDoc.getPessimisticLocks(), systemPerson, null);

    // Ensure that workflow pessimistic locks can also be released.
    lockService.releaseWorkflowPessimisticLocking(accountDoc);
    assertTrue("There should not be any pessimistic locks present on the document", accountDoc.getPessimisticLocks().isEmpty());
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:75,
代码来源:PessimisticLockServiceTest.java

示例8: assertCustomLockDescriptorsAreWorking

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * A convenience method for testing the custom lock descriptors of documents (and on the maintainables of maintenance documents).
 * 
 * @param testDoc The document to test pessimistic locking on (or the maintenance document with maintainables to test on).
 * @param LOCK_KEY The UserSession object key to use for storing the lock descriptor's key.
 * @param LOCK_VALUE1 One possible object to store in a UserSession for generating lock descriptors on the testDoc.
 * @param LOCK_VALUE2 Another possible object to store in a UserSession for generating lock descriptors on the testDoc.
 * 
 * @throws Exception
 */
private void assertCustomLockDescriptorsAreWorking(Document testDoc, final String LOCK_KEY, final Serializable LOCK_VALUE1,
		final Serializable LOCK_VALUE2) throws Exception {
	PessimisticLockService lockService = KRADServiceLocatorWeb.getPessimisticLockService();
	
	// Have "quickstart" establish a pessimistic lock on the document by using a custom lock descriptor that only locks part of the document.
   	UserSession quickstartSession = new UserSession("quickstart");
   	Person[] allPersons = { quickstartSession.getPerson(), null };
	Map<String,String> editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE1);
	String[] allDescriptors = { testDoc.getCustomLockDescriptor(quickstartSession.getPerson()), null };
	assertNotNull("The document should have generated a custom lock descriptor", allDescriptors[0]);
	Map <?,?> finalModes = lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());
	
	// Verify that the lock was actually established and that the expected custom lock descriptor was used.
	assertCorrectLocksAreInPlace(true, finalModes, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	
	// Attempt to establish the same lock again, which should change nothing since "quickstart" already has the lock.
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE1);
	lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(false, null, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	
	// Now check to make sure that a different user (such as "admin") cannot establish a lock using the same lock descriptor.
	UserSession adminSession = new UserSession("admin");
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
   	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE1);
	assertEquals("The document should have generated the same lock descriptors for both 'quickstart' and 'admin'",
			allDescriptors[0], testDoc.getCustomLockDescriptor(adminSession.getPerson()));
	finalModes = lockService.establishLocks(testDoc, editMode, adminSession.getPerson());
	assertCorrectLocksAreInPlace(false, finalModes, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	
	// Ensure that "admin" can establish a lock that has a different lock descriptor.
	allPersons[1] = adminSession.getPerson();
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE2);
	allDescriptors[1] = testDoc.getCustomLockDescriptor(adminSession.getPerson());
	assertNotNull("The document should have generated a custom lock descriptor", allDescriptors[1]);
	assertNotSame("'quickstart' and 'admin' should have different custom lock descriptors now", allDescriptors[0], allDescriptors[1]);
	finalModes = lockService.establishLocks(testDoc, editMode, adminSession.getPerson());
	assertCorrectLocksAreInPlace(true, finalModes, 2, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	
	// Verify that "quickstart" cannot acquire the lock owned by "admin".
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE2);
	lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(false, null, 2, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	
	// After "admin" releases his lock, check to make sure that "quickstart" can now acquire it.
	lockService.releaseAllLocksForUser(testDoc.getPessimisticLocks(), allPersons[1], allDescriptors[1]);
	testDoc.refreshPessimisticLocks();
	assertCorrectLocksAreInPlace(false, null, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	allPersons[1] = allPersons[0];
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE2);
	finalModes = lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(true, finalModes, 2, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	
	// Release all the locks when done.
	GlobalVariables.getUserSession().removeObject(LOCK_KEY);
	lockService.releaseAllLocksForUser(testDoc.getPessimisticLocks(), allPersons[0]);
	testDoc.refreshPessimisticLocks();
	assertTrue("There should not be any pessimistic locks present on the document", testDoc.getPessimisticLocks().isEmpty());
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:80,
代码来源:PessimisticLockServiceTest.java

示例9: InquiryForm

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
public InquiryForm() {
    super();
    this.editingMode = new HashMap();
    this.editingMode.put(AuthorizationConstants.EditMode.VIEW_ONLY, "TRUE");
    this.inactiveRecordDisplay = null;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:7,
代码来源:InquiryForm.java

示例10: getEditModes

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
public Set<String> getEditModes(Document document){
// this logic isn't very good, but we need to get this working for now to facilitate testing
  	Set<String> editModes = new HashSet();
  	editModes.add(AuthorizationConstants.EditMode.FULL_ENTRY);
  	return editModes;
  }
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:7,
代码来源:TravelDocumentPresentationController.java

示例11: loadPersistedOutputGroup

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * Retrieves the output origin entries that were saved by the {@link #persistOriginEntryGroupsForDocumentSave(CorrectionForm)}
 * method
 *
 * @param correctionForm
 * @param setSequentialIds if true and not in restricted functionality mode, a pseudo-entry id will be assigned to each of the
 *        elements in the form's allEntries attribute.
 * @throws Exception
 */
protected void loadPersistedOutputGroup(CorrectionForm correctionForm, boolean setSequentialIds) throws Exception {

    GeneralLedgerCorrectionProcessDocument document = correctionForm.getCorrectionDocument();

    CorrectionDocumentService correctionDocumentService = SpringContext.getBean(CorrectionDocumentService.class);
    if (!correctionDocumentService.areOutputOriginEntriesPersisted(document)) {
        // the input origin entry group has been purged from the system
        correctionForm.setPersistedOriginEntriesMissing(true);
        correctionForm.setRestrictedFunctionalityMode(true);
        return;
    }


    correctionForm.setPersistedOriginEntriesMissing(false);

    int recordCountFunctionalityLimit;
    if (CorrectionDocumentService.CORRECTION_TYPE_MANUAL.equals(correctionForm.getEditMethod())) {
        // with manual edits, rows may have been added so that the list goes would go into restricted func mode
        // so for manual edits, we ignore this limit
        recordCountFunctionalityLimit = CorrectionDocumentUtils.RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_UNLIMITED;
    }
    else {
        recordCountFunctionalityLimit = CorrectionDocumentUtils.getRecordCountFunctionalityLimit();
    }

    List<OriginEntryFull> searchResults = correctionDocumentService.retrievePersistedOutputOriginEntries(document, recordCountFunctionalityLimit);

    if (searchResults == null) {
        // null when the origin entry list is too large (i.e. in restricted functionality mode)
        correctionForm.setRestrictedFunctionalityMode(true);
        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();

        Map<String, String> documentActions = correctionForm.getDocumentActions();
        if (documentActions.containsKey(AuthorizationConstants.EditMode.FULL_ENTRY) || workflowDocument.isCanceled()) {
            // doc in read/write mode or is cancelled, so the doc summary fields of the doc are unreliable, so clear them out
            updateDocumentSummary(document, null, true);
        }
        // else we defer to the values already in the doc, and just don't touch the values
    }
    else {
        correctionForm.setAllEntries(searchResults);
        correctionForm.setDisplayEntries(new ArrayList<OriginEntryFull>(searchResults));

        if (setSequentialIds) {
            CorrectionDocumentUtils.setSequentialEntryIds(correctionForm.getAllEntries());
        }

        // if we can display the entries (i.e. not restricted functionality mode), then recompute the summary
        updateDocumentSummary(document, correctionForm.getAllEntries(), false);

        // if not in restricted functionality mode, then we can store these results temporarily in the GLCP origin entry service
        SequenceAccessorService sequenceAccessorService = SpringContext.getBean(SequenceAccessorService.class);
        String glcpSearchResultsSequenceNumber = String.valueOf(sequenceAccessorService.getNextAvailableSequenceNumber(KRADConstants.LOOKUP_RESULTS_SEQUENCE));

        SpringContext.getBean(GlCorrectionProcessOriginEntryService.class).persistAllEntries(glcpSearchResultsSequenceNumber, searchResults);
        correctionForm.setGlcpSearchResultsSequenceNumber(glcpSearchResultsSequenceNumber);

        int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
        KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();
        originEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);
        originEntrySearchResultTableMetadata.setColumnToSortIndex(-1);
    }
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:73,
代码来源:CorrectionAction.java

示例12: loadPersistedOutputGroup

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * Retrieves the output origin entries that were saved by the {@link #persistOriginEntryGroupsForDocumentSave(CorrectionForm)}
 * method
 * 
 * @param correctionForm
 * @param setSequentialIds if true and not in restricted functionality mode, a pseudo-entry id will be assigned to each of the
 *        elements in the form's allEntries attribute.
 * @throws Exception
 */
protected void loadPersistedOutputGroup(CorrectionForm correctionForm, boolean setSequentialIds) throws Exception {

    GeneralLedgerCorrectionProcessDocument document = correctionForm.getCorrectionDocument();

    CorrectionDocumentService correctionDocumentService = SpringContext.getBean(CorrectionDocumentService.class);
    if (!correctionDocumentService.areOutputOriginEntriesPersisted(document)) {
        // the input origin entry group has been purged from the system
        correctionForm.setPersistedOriginEntriesMissing(true);
        correctionForm.setRestrictedFunctionalityMode(true);
        return;
    }


    correctionForm.setPersistedOriginEntriesMissing(false);

    int recordCountFunctionalityLimit;
    if (CorrectionDocumentService.CORRECTION_TYPE_MANUAL.equals(correctionForm.getEditMethod())) {
        // with manual edits, rows may have been added so that the list goes would go into restricted func mode
        // so for manual edits, we ignore this limit
        recordCountFunctionalityLimit = CorrectionDocumentUtils.RECORD_COUNT_FUNCTIONALITY_LIMIT_IS_UNLIMITED;
    }
    else {
        recordCountFunctionalityLimit = CorrectionDocumentUtils.getRecordCountFunctionalityLimit();
    }

    List<OriginEntryFull> searchResults = correctionDocumentService.retrievePersistedOutputOriginEntries(document, recordCountFunctionalityLimit);

    if (searchResults == null) {
        // null when the origin entry list is too large (i.e. in restricted functionality mode)
        correctionForm.setRestrictedFunctionalityMode(true);
        WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument();

        Map<String, String> documentActions = correctionForm.getDocumentActions();
        if (documentActions.containsKey(AuthorizationConstants.EditMode.FULL_ENTRY) || workflowDocument.isCanceled()) {
            // doc in read/write mode or is cancelled, so the doc summary fields of the doc are unreliable, so clear them out
            updateDocumentSummary(document, null, true);
        }
        // else we defer to the values already in the doc, and just don't touch the values
    }
    else {
        correctionForm.setAllEntries(searchResults);
        correctionForm.setDisplayEntries(new ArrayList<OriginEntryFull>(searchResults));

        if (setSequentialIds) {
            CorrectionDocumentUtils.setSequentialEntryIds(correctionForm.getAllEntries());
        }

        // if we can display the entries (i.e. not restricted functionality mode), then recompute the summary
        updateDocumentSummary(document, correctionForm.getAllEntries(), false);

        // if not in restricted functionality mode, then we can store these results temporarily in the GLCP origin entry service
        SequenceAccessorService sequenceAccessorService = SpringContext.getBean(SequenceAccessorService.class);
        String glcpSearchResultsSequenceNumber = String.valueOf(sequenceAccessorService.getNextAvailableSequenceNumber(KRADConstants.LOOKUP_RESULTS_SEQUENCE));

        SpringContext.getBean(GlCorrectionProcessOriginEntryService.class).persistAllEntries(glcpSearchResultsSequenceNumber, searchResults);
        correctionForm.setGlcpSearchResultsSequenceNumber(glcpSearchResultsSequenceNumber);

        int maxRowsPerPage = CorrectionDocumentUtils.getRecordsPerPage();
        KualiTableRenderFormMetadata originEntrySearchResultTableMetadata = correctionForm.getOriginEntrySearchResultTableMetadata();
        originEntrySearchResultTableMetadata.jumpToFirstPage(correctionForm.getDisplayEntries().size(), maxRowsPerPage);
        originEntrySearchResultTableMetadata.setColumnToSortIndex(-1);
    }
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:73,
代码来源:CorrectionAction.java

示例13: testEstablishLocks

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * tests the PessimisticLockService.establishLocks method and the PessimisticLockService.getDocumentActions method
 * 
 * @throws Exception
 */
@Test
public void testEstablishLocks() throws Exception {
	PessimisticLockService lockService = KRADServiceLocatorWeb.getPessimisticLockService();
	AccountRequestDocument accountDoc = (AccountRequestDocument) KRADServiceLocatorWeb.getDocumentService().getNewDocument("AccountRequest");
	
	assertTrue("The AccountRequestDocument should be using pessimistic locking",
			KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry(accountDoc.getClass().getName()).getUsePessimisticLocking());
	
	// Have "quickstart" establish a pessimistic lock on the account request document.
	UserSession quickstartSession = new UserSession("quickstart");
	Person[] quickstartPerson = { quickstartSession.getPerson() };
	Map<String,String> editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	Map <?,?> finalModes = lockService.establishLocks(accountDoc, editMode, quickstartSession.getPerson());
	
	// Verify that the lock was actually established.
	assertCorrectLocksAreInPlace(true, finalModes, 1, accountDoc.getPessimisticLocks(), quickstartPerson, null);
	
	// Now check to make sure that a different user (such as "admin") cannot save, route, cancel, or blanket approve the document.
	UserSession adminSession = new UserSession("admin");
	Set<String> documentActions = new HashSet<String>(Arrays.asList(new String[] { KRADConstants.KUALI_ACTION_CAN_CANCEL,
			KRADConstants.KUALI_ACTION_CAN_SAVE, KRADConstants.KUALI_ACTION_CAN_ROUTE, KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE }));
	Set<?> finalActions = lockService.getDocumentActions(accountDoc, adminSession.getPerson(), documentActions);
	assertFalse("'admin' should not be able to cancel the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_CANCEL));
	assertFalse("'admin' should not be able to save the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_SAVE));
	assertFalse("'admin' should not be able to route the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_ROUTE));
	assertFalse("'admin' should not be able to blanket approve the locked document", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE));
	
	// Verify that "quickstart" can save, route, and cancel the document since he is the owner of the lock.
	documentActions = new HashSet<String>(Arrays.asList(new String[] {
			KRADConstants.KUALI_ACTION_CAN_CANCEL, KRADConstants.KUALI_ACTION_CAN_SAVE, KRADConstants.KUALI_ACTION_CAN_ROUTE }));
	finalActions = lockService.getDocumentActions(accountDoc, quickstartSession.getPerson(), documentActions);
	assertTrue("'quickstart' should have had cancel privileges", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_CANCEL));
	assertTrue("'quickstart' should have had save privileges", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_SAVE));
	assertTrue("'quickstart' should have had route privileges", finalActions.contains(KRADConstants.KUALI_ACTION_CAN_ROUTE));
	
	// Check that "admin" cannot establish a lock when one is already in place.
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	finalModes = lockService.establishLocks(accountDoc, editMode, adminSession.getPerson());
	assertCorrectLocksAreInPlace(false, finalModes, 1, accountDoc.getPessimisticLocks(), quickstartPerson, null);
	
	// Make sure that "quickstart" cannot create a second lock if custom lock descriptors are not in use.
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	finalModes = lockService.establishLocks(accountDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(true, finalModes, 1, accountDoc.getPessimisticLocks(), quickstartPerson, null);
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:54,
代码来源:PessimisticLockServiceTest.java

示例14: assertCustomLockDescriptorsAreWorking

点赞 2

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * A convenience method for testing the custom lock descriptors of documents (and on the maintainables of maintenance documents).
 *
 * @param testDoc The document to test pessimistic locking on (or the maintenance document with maintainables to test on).
 * @param LOCK_KEY The UserSession object key to use for storing the lock descriptor's key.
 * @param LOCK_VALUE1 One possible object to store in a UserSession for generating lock descriptors on the testDoc.
 * @param LOCK_VALUE2 Another possible object to store in a UserSession for generating lock descriptors on the testDoc.
 *
 * @throws Exception
 */
private void assertCustomLockDescriptorsAreWorking(Document testDoc, final String LOCK_KEY, final Serializable LOCK_VALUE1,
		final Serializable LOCK_VALUE2) throws Exception {
	PessimisticLockService lockService = KRADServiceLocatorWeb.getPessimisticLockService();

	// Have "quickstart" establish a pessimistic lock on the document by using a custom lock descriptor that only locks part of the document.
   	UserSession quickstartSession = new UserSession("quickstart");
   	Person[] allPersons = { quickstartSession.getPerson(), null };
	Map<String,String> editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE1);
	String[] allDescriptors = { testDoc.getCustomLockDescriptor(quickstartSession.getPerson()), null };
	assertNotNull("The document should have generated a custom lock descriptor", allDescriptors[0]);
	Map <?,?> finalModes = lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());

	// Verify that the lock was actually established and that the expected custom lock descriptor was used.
	assertCorrectLocksAreInPlace(true, finalModes, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);

	// Attempt to establish the same lock again, which should change nothing since "quickstart" already has the lock.
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE1);
	lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(false, null, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);

	// Now check to make sure that a different user (such as "admin") cannot establish a lock using the same lock descriptor.
	UserSession adminSession = new UserSession("admin");
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
   	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE1);
	assertEquals("The document should have generated the same lock descriptors for both 'quickstart' and 'admin'",
			allDescriptors[0], testDoc.getCustomLockDescriptor(adminSession.getPerson()));
	finalModes = lockService.establishLocks(testDoc, editMode, adminSession.getPerson());
	assertCorrectLocksAreInPlace(false, finalModes, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);

	// Ensure that "admin" can establish a lock that has a different lock descriptor.
	allPersons[1] = adminSession.getPerson();
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE2);
	allDescriptors[1] = testDoc.getCustomLockDescriptor(adminSession.getPerson());
	assertNotNull("The document should have generated a custom lock descriptor", allDescriptors[1]);
	assertNotSame("'quickstart' and 'admin' should have different custom lock descriptors now", allDescriptors[0], allDescriptors[1]);
	finalModes = lockService.establishLocks(testDoc, editMode, adminSession.getPerson());
	assertCorrectLocksAreInPlace(true, finalModes, 2, testDoc.getPessimisticLocks(), allPersons, allDescriptors);

	// Verify that "quickstart" cannot acquire the lock owned by "admin".
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE2);
	lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(false, null, 2, testDoc.getPessimisticLocks(), allPersons, allDescriptors);

	// After "admin" releases his lock, check to make sure that "quickstart" can now acquire it.
	lockService.releaseAllLocksForUser(testDoc.getPessimisticLocks(), allPersons[1], allDescriptors[1]);
	testDoc.refreshPessimisticLocks();
	assertCorrectLocksAreInPlace(false, null, 1, testDoc.getPessimisticLocks(), allPersons, allDescriptors);
	allPersons[1] = allPersons[0];
	editMode = new HashMap<String,String>();
	editMode.put(AuthorizationConstants.EditMode.FULL_ENTRY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
	GlobalVariables.getUserSession().addObject(LOCK_KEY, LOCK_VALUE2);
	finalModes = lockService.establishLocks(testDoc, editMode, quickstartSession.getPerson());
	assertCorrectLocksAreInPlace(true, finalModes, 2, testDoc.getPessimisticLocks(), allPersons, allDescriptors);

	// Release all the locks when done.
	GlobalVariables.getUserSession().removeObject(LOCK_KEY);
	lockService.releaseAllLocksForUser(testDoc.getPessimisticLocks(), allPersons[0]);
	testDoc.refreshPessimisticLocks();
	assertTrue("There should not be any pessimistic locks present on the document", testDoc.getPessimisticLocks().isEmpty());
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:80,
代码来源:PessimisticLockServiceTest.java

示例15: isEntryEditMode

点赞 1

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * This method is used to check if the given {@link Map.Entry} is an 'entry type' edit mode and that the value is set to
 * signify that this user has that edit mode available to them
 *
 * @param entry -
 *            the {@link Map.Entry} object that contains an edit mode such as the ones returned but
 *            {@link #getEditMode(Document, Person)}
 * @return true if the given entry has a key signifying an 'entry type' edit mode and the value is equal to
 *         {@link #EDIT_MODE_DEFAULT_TRUE_VALUE}... false if not
 */
@Deprecated
protected boolean isEntryEditMode(Map.Entry entry) {
	// check for FULL_ENTRY edit mode set to default true value
	if (AuthorizationConstants.EditMode.FULL_ENTRY.equals(entry.getKey())) {
		String fullEntryEditModeValue = (String)entry.getValue();
		return ( StringUtils.equalsIgnoreCase(KRADConstants.KUALI_DEFAULT_TRUE_VALUE, fullEntryEditModeValue) );
	}
	return false;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:20,
代码来源:PessimisticLockServiceImpl.java

示例16: isEntryEditMode

点赞 1

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * This method is used to check if the given {@link Map.Entry} is an 'entry type' edit mode and that the value is set to
 * signify that this user has that edit mode available to them
 *
 * @param entry -
 *            the {@link Map.Entry} object that contains an edit mode such as the ones returned but
 *            {@link #getEditMode(Document, Person)}
 * @return true if the given entry has a key signifying an 'entry type' edit mode and the value is equal to
 *         {@link #EDIT_MODE_DEFAULT_TRUE_VALUE}... false if not
 */
protected boolean isEntryEditMode(Map.Entry entry) {
	// check for FULL_ENTRY edit mode set to default true value
	if (AuthorizationConstants.EditMode.FULL_ENTRY.equals(entry.getKey())) {
		String fullEntryEditModeValue = (String)entry.getValue();           
		return ( StringUtils.equalsIgnoreCase(KRADConstants.KUALI_DEFAULT_TRUE_VALUE, fullEntryEditModeValue) );
	}
	return false;
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:19,
代码来源:PessimisticLockServiceImpl.java

示例17: getEntryEditModeReplacementMode

点赞 1

import org.kuali.rice.kns.authorization.AuthorizationConstants; //导入依赖的package包/类
/**
 * This method is used to return values needed to replace the given 'entry type' edit mode {@link Map.Entry} with one that will not allow the user to enter data on the document
 *
 * @param entry - the current 'entry type' edit mode to replace
 * @return a Map of edit modes that will be used to replace this edit mode (represented by the given entry parameter)
 */
protected Map getEntryEditModeReplacementMode(Map.Entry entry) {
    Map editMode = new HashMap();
    editMode.put(AuthorizationConstants.EditMode.VIEW_ONLY, KRADConstants.KUALI_DEFAULT_TRUE_VALUE);
    return editMode;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:12,
代码来源:PessimisticLockServiceImpl.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)