@Test(expected = IllegalStateException.class) public void testLifecycleNoConfigurationGetReference() { new UserManagerResolver().getReference(userManager.getPrincipal("Administrator")); }
@Override public Serializable getReference(Object entity) throws IllegalStateException { checkConfig(); if (entity != null) { if (entity instanceof NuxeoPrincipal && includingUsers) { return NuxeoPrincipal.PREFIX + ((NuxeoPrincipal) entity).getName(); } else if (entity instanceof NuxeoGroup && includingGroups) { return NuxeoGroup.PREFIX + ((NuxeoGroup) entity).getName(); } } return null; }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public Serializable getReference(Object entity) throws IllegalStateException { checkConfig(); if (entity != null) { if (entity instanceof NuxeoPrincipal && includingUsers) { return NuxeoPrincipal.PREFIX + ((NuxeoPrincipal) entity).getName(); } else if (entity instanceof NuxeoGroup && includingGroups) { return NuxeoGroup.PREFIX + ((NuxeoGroup) entity).getName(); } } return null; } }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public Serializable getReference(Object entity) throws IllegalStateException { checkConfig(); if (entity != null) { if (entity instanceof NuxeoPrincipal && includingUsers) { return NuxeoPrincipal.PREFIX + ((NuxeoPrincipal) entity).getName(); } else if (entity instanceof NuxeoGroup && includingGroups) { return NuxeoGroup.PREFIX + ((NuxeoGroup) entity).getName(); } } return null; }  }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public Serializable getReference(Object entity) throws IllegalStateException { checkConfig(); if (entity != null) { if (entity instanceof NuxeoPrincipal && includingUsers) { return NuxeoPrincipal.PREFIX + ((NuxeoPrincipal) entity).getName(); } else if (entity instanceof NuxeoGroup && includingGroups) { return NuxeoGroup.PREFIX + ((NuxeoGroup) entity).getName(); } } return null; }  UserManager getUserManager(); @Override List<Class<?>> getManagedClasses(); @Override void configure(Map<String, String> parameters); @Override String getName(); @Override Object fetch(Object value); @SuppressWarnings("unchecked") @Override T fetch(Class<T> type, Object value); @Override Serializable getReference(Object entity); @Override String getConstraintErrorMessage(Object invalidValue, Locale locale); boolean isIncludingUsers(); boolean isIncludingGroups(); }
UserManagerResolver extends AbstractObjectResolver implements ObjectResolver { @Override public Serializable getReference(Object entity) throws IllegalStateException { checkConfig(); if (entity != null) { if (entity instanceof NuxeoPrincipal && includingUsers) { return NuxeoPrincipal.PREFIX + ((NuxeoPrincipal) entity).getName(); } else if (entity instanceof NuxeoGroup && includingGroups) { return NuxeoGroup.PREFIX + ((NuxeoGroup) entity).getName(); } } return null; }  UserManager getUserManager(); @Override List<Class<?>> getManagedClasses(); @Override void configure(Map<String, String> parameters); @Override String getName(); @Override Object fetch(Object value); @SuppressWarnings("unchecked") @Override T fetch(Class<T> type, Object value); @Override Serializable getReference(Object entity); @Override String getConstraintErrorMessage(Object invalidValue, Locale locale); boolean isIncludingUsers(); boolean isIncludingGroups(); static final String INPUT_PARAM_FILTER; static final String FILTER_GROUP; static final String FILTER_USER; static final String NAME; static final String PARAM_INCLUDE_USERS; static final String PARAM_INCLUDE_GROUPS; }