List of usage examples for java.lang UnsupportedOperationException getMessage
public String getMessage()
From source file:net.sourceforge.fenixedu.presentationTier.Action.resourceAllocationManager.ManageLessonDA.java
public ActionForward deleteLessonInstance(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { NextPossibleSummaryLessonsAndDatesBean bean = NextPossibleSummaryLessonsAndDatesBean .getNewInstance(request.getParameter("lessonDate")); try {//from w w w. j a v a 2 s.c o m DeleteLessonInstance.run(bean.getLesson(), bean.getDate()); ActionErrors actionErrors = new ActionErrors(); actionErrors.add(null, new ActionError("message.deleteLesson", bean.getDate())); saveErrors(request, actionErrors); } catch (UnsupportedOperationException unsupportedOperationException) { ActionErrors actionErrors = new ActionErrors(); actionErrors.add(unsupportedOperationException.getMessage(), new ActionError("error.Lesson.not.instanced", bean.getDate())); saveErrors(request, actionErrors); } catch (DomainException domainException) { ActionErrors actionErrors = new ActionErrors(); actionErrors.add(domainException.getMessage(), new ActionError(domainException.getMessage())); saveErrors(request, actionErrors); } return viewAllLessonDates(mapping, form, request, response); }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test createNode//from w w w . j a v a 2 s.c o m */ public void testCreateNode() { try { this.versionStoreNodeService.createNode(dummyNodeRef, null, dummyQName, ContentModel.TYPE_CONTENT); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test addAspect//from w w w .j a v a2 s.c o m */ public void testAddAspect() { try { this.versionStoreNodeService.addAspect(dummyNodeRef, TEST_ASPECT_QNAME, null); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test removeAspect//from ww w.j a v a2s. c om */ public void testRemoveAspect() { try { this.versionStoreNodeService.removeAspect(dummyNodeRef, TEST_ASPECT_QNAME); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test delete node/*from w ww .j a va 2s . com*/ */ public void testDeleteNode() { try { this.versionStoreNodeService.deleteNode(this.dummyNodeRef); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test removeChild/*from w ww .j av a 2 s.c om*/ */ public void testRemoveChild() { try { this.versionStoreNodeService.removeChild(this.dummyNodeRef, this.dummyNodeRef); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test setProperties/*from w ww. ja v a 2 s . c o m*/ */ public void testSetProperties() { try { this.versionStoreNodeService.setProperties(this.dummyNodeRef, new HashMap<QName, Serializable>()); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test setProperty/*from w w w . j a va2 s . co m*/ */ public void testSetProperty() { try { this.versionStoreNodeService.setProperty(this.dummyNodeRef, this.dummyQName, "dummy"); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test createAssociation/*from w w w.j a v a2s . c om*/ */ public void testCreateAssociation() { try { this.versionStoreNodeService.createAssociation(this.dummyNodeRef, this.dummyNodeRef, this.dummyQName); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }
From source file:org.alfresco.repo.version.NodeServiceImplTest.java
/** * Test removeAssociation// www. j a v a2 s . com */ public void testRemoveAssociation() { try { this.versionStoreNodeService.removeAssociation(this.dummyNodeRef, this.dummyNodeRef, this.dummyQName); fail("This operation is not supported."); } catch (UnsupportedOperationException exception) { if (exception.getMessage() != MSG_ERR) { fail("Unexpected exception raised during method excution: " + exception.getMessage()); } } }