@Test public void isPageResource() { PageUtil util = new PageUtil(); assertTrue(util.isPageResource(resource)); }
public boolean isPageResource(Resource resource) { if (resource == null) { return false; } String path = resource.getPath(); if (!path.startsWith(CONTENT) || path.contains(JcrConstants.JCR_CONTENT)) { return false; } String primaryType = resource.getValueMap().get(JcrConstants.JCR_PRIMARYTYPE, String.class); return NameConstants.NT_PAGE.equals(primaryType); }
PageUtil { public boolean isPageResource(Resource resource) { if (resource == null) { return false; } String path = resource.getPath(); if (!path.startsWith(CONTENT) || path.contains(JcrConstants.JCR_CONTENT)) { return false; } String primaryType = resource.getValueMap().get(JcrConstants.JCR_PRIMARYTYPE, String.class); return NameConstants.NT_PAGE.equals(primaryType); } }
PageUtil { public boolean isPageResource(Resource resource) { if (resource == null) { return false; } String path = resource.getPath(); if (!path.startsWith(CONTENT) || path.contains(JcrConstants.JCR_CONTENT)) { return false; } String primaryType = resource.getValueMap().get(JcrConstants.JCR_PRIMARYTYPE, String.class); return NameConstants.NT_PAGE.equals(primaryType); }  }
PageUtil { public boolean isPageResource(Resource resource) { if (resource == null) { return false; } String path = resource.getPath(); if (!path.startsWith(CONTENT) || path.contains(JcrConstants.JCR_CONTENT)) { return false; } String primaryType = resource.getValueMap().get(JcrConstants.JCR_PRIMARYTYPE, String.class); return NameConstants.NT_PAGE.equals(primaryType); }  boolean isPageResource(Resource resource); }
PageUtil { public boolean isPageResource(Resource resource) { if (resource == null) { return false; } String path = resource.getPath(); if (!path.startsWith(CONTENT) || path.contains(JcrConstants.JCR_CONTENT)) { return false; } String primaryType = resource.getValueMap().get(JcrConstants.JCR_PRIMARYTYPE, String.class); return NameConstants.NT_PAGE.equals(primaryType); }  boolean isPageResource(Resource resource);  }