@Test public void testGetSecurityType() throws Exception { assertThat(factory.newEntityReference(null).getSecurityType(), equalTo(SecurityReference.FARM)); assertThat(factory.newEntityReference(xwiki).getSecurityType(), equalTo(SecurityReference.FARM)); assertThat(factory.newEntityReference(wiki).getSecurityType(), equalTo(EntityType.WIKI)); assertThat(factory.newEntityReference(xspace).getSecurityType(), equalTo(EntityType.SPACE)); assertThat(factory.newEntityReference(space).getSecurityType(), equalTo(EntityType.SPACE)); assertThat(factory.newEntityReference(mainEntity).getSecurityType(), equalTo(EntityType.DOCUMENT)); assertThat(factory.newEntityReference(subEntity).getSecurityType(), equalTo(EntityType.DOCUMENT)); }
public EntityType getSecurityType() { EntityType type = getType(); if (type != EntityType.WIKI || !this.equals(this.mainWikiReference)) { return type; } return FARM; }
SecurityReference extends EntityReference { public EntityType getSecurityType() { EntityType type = getType(); if (type != EntityType.WIKI || !this.equals(this.mainWikiReference)) { return type; } return FARM; } }
SecurityReference extends EntityReference { public EntityType getSecurityType() { EntityType type = getType(); if (type != EntityType.WIKI || !this.equals(this.mainWikiReference)) { return type; } return FARM; } SecurityReference(EntityReference reference);   SecurityReference(EntityReference reference, SecurityReference mainWiki); }
SecurityReference extends EntityReference { public EntityType getSecurityType() { EntityType type = getType(); if (type != EntityType.WIKI || !this.equals(this.mainWikiReference)) { return type; } return FARM; } SecurityReference(EntityReference reference);   SecurityReference(EntityReference reference, SecurityReference mainWiki); SecurityReference getParentSecurityReference(); Deque<SecurityReference> getReversedSecurityReferenceChain(); EntityType getSecurityType(); SecurityReference getWikiReference(); EntityReference getOriginalReference(); WikiReference getOriginalWikiReference(); SpaceReference getOriginalSpaceReference(); DocumentReference getOriginalDocumentReference(); }
SecurityReference extends EntityReference { public EntityType getSecurityType() { EntityType type = getType(); if (type != EntityType.WIKI || !this.equals(this.mainWikiReference)) { return type; } return FARM; } SecurityReference(EntityReference reference);   SecurityReference(EntityReference reference, SecurityReference mainWiki); SecurityReference getParentSecurityReference(); Deque<SecurityReference> getReversedSecurityReferenceChain(); EntityType getSecurityType(); SecurityReference getWikiReference(); EntityReference getOriginalReference(); WikiReference getOriginalWikiReference(); SpaceReference getOriginalSpaceReference(); DocumentReference getOriginalDocumentReference(); static final EntityType FARM; }