@FixFor( "MODE-1525" ) @Test public void shouldDiscoverCorrectChildNodeTypeButFailOnMandatoryPropertiesWithNoDefaultValues() throws Exception { session = createSession(); InputStream cndStream = getClass().getResourceAsStream("/cnd/medical-invalid-mandatories.cnd"); assertThat(cndStream, is(notNullValue())); session.getWorkspace().getNodeTypeManager().registerNodeTypes(cndStream, true); Node root = session.getRootNode(); Node person = root.addNode("jsmith", "inf:person"); person.setProperty("inf:firstName", "John"); person.setProperty("inf:lastName", "Smith"); session.save(); Node doctor = root.addNode("drBarnes", "inf:doctor"); doctor.setProperty("inf:firstName", "Sally"); doctor.setProperty("inf:lastName", "Barnes"); doctor.setProperty("inf:doctorProviderNumber", "12345678-AB"); session.save(); Node referral = root.addNode("referral", "nt:unstructured"); referral.addMixin("er:eReferral"); assertThat(referral.getMixinNodeTypes()[0].getName(), is("er:eReferral")); Node group = referral.addNode("er:gp"); assertThat(group.getPrimaryNodeType().getName(), is("inf:doctor")); try { session.save(); fail("Expected a constraint violation exception"); } catch (ConstraintViolationException e) { } group.setProperty("inf:firstName", "Sally"); group.setProperty("inf:lastName", "Barnes"); session.save(); }
@Override public String getName() { return repositoryName.get(); }
JcrRepository implements org.modeshape.jcr.api.Repository { @Override public String getName() { return repositoryName.get(); } }
JcrRepository implements org.modeshape.jcr.api.Repository { @Override public String getName() { return repositoryName.get(); } protected  JcrRepository( RepositoryConfiguration configuration ); }
JcrRepository implements org.modeshape.jcr.api.Repository { @Override public String getName() { return repositoryName.get(); } protected  JcrRepository( RepositoryConfiguration configuration ); State getState(); @Override String getName(); @Override int getActiveSessionsCount(); RepositoryStatistics getRepositoryStatistics(); Problems getStartupProblems(); Transactions transactions(); RepositoryConfiguration getConfiguration(); @Override String getDescriptor( String key ); @Override JcrValue getDescriptorValue( String key ); @Override JcrValue[] getDescriptorValues( String key ); @Override boolean isSingleValueDescriptor( String key ); @Override boolean isStandardDescriptor( String key ); @Override String[] getDescriptorKeys(); @Override synchronized JcrSession login(); @Override synchronized JcrSession login( Credentials credentials ); @Override synchronized JcrSession login( String workspaceName ); @Override synchronized JcrSession login( final Credentials credentials,
                                          String workspaceName ); }
JcrRepository implements org.modeshape.jcr.api.Repository { @Override public String getName() { return repositoryName.get(); } protected  JcrRepository( RepositoryConfiguration configuration ); State getState(); @Override String getName(); @Override int getActiveSessionsCount(); RepositoryStatistics getRepositoryStatistics(); Problems getStartupProblems(); Transactions transactions(); RepositoryConfiguration getConfiguration(); @Override String getDescriptor( String key ); @Override JcrValue getDescriptorValue( String key ); @Override JcrValue[] getDescriptorValues( String key ); @Override boolean isSingleValueDescriptor( String key ); @Override boolean isStandardDescriptor( String key ); @Override String[] getDescriptorKeys(); @Override synchronized JcrSession login(); @Override synchronized JcrSession login( Credentials credentials ); @Override synchronized JcrSession login( String workspaceName ); @Override synchronized JcrSession login( final Credentials credentials,
                                          String workspaceName );  }