class DefaultAccAccountService extends AbstractEventableDtoService<AccAccountDto, AccAccount, AccAccountFilter> implements AccAccountService {

	@Override
	public IcConnectorObject getConnectorObject(AccAccountDto account, BasePermission... permissions) {
		Assert.notNull(account, "Account cannot be null!");
		this.checkAccess(account, permissions);
		List<SysSchemaAttributeDto> schemaAttributes = this.getSchemaAttributes(account.getSystem(), null);
		if (schemaAttributes == null) {
			return null;
		}
		try {
			IcConnectorObject fullObject = this.systemService.readConnectorObject(account.getSystem(),
					account.getRealUid(), null);
			return this.getConnectorObjectForSchema(fullObject, schemaAttributes);
		} catch (Exception ex) {
			SysSystemDto system = DtoUtils.getEmbedded(account, AccAccount_.system, SysSystemDto.class);
			throw new ResultCodeException(AccResultCode.ACCOUNT_CANNOT_BE_READ_FROM_TARGET, ImmutableMap.of("account",
					account.getUid(), "system", system != null ? system.getName() : account.getSystem()), ex);
		}
	}

	@Autowired public  DefaultAccAccountService(AccAccountRepository accountRepository,
			AccIdentityAccountService identityAccountService, SysSystemService systemService,
			SysSchemaObjectClassService schemaObjectClassService, SysSchemaAttributeService schemaAttributeService,
			EntityEventManager entityEventManager);

}