class NamespacesServiceImpl implements NamespacesService {

    @Override
    public List<AppIdNamespaceDto> getNamespaces() {
        AppEngineHelper.disableApiHooks();

        Iterable<Entity> entities = datastoreHelper.getAllNamespaces();

        Iterable<AppIdNamespaceDto> namespaces = FluentIterable.from(entities)
                .transform(new Function<Entity, AppIdNamespaceDto>() {
                    @Override
                    public AppIdNamespaceDto apply(Entity input) {
                        return new AppIdNamespaceDto(input.getAppId(),
                                Entities.getNamespaceFromNamespaceKey(input.getKey()));
                    }
                });

        return Lists.newArrayList(namespaces);
    }

    @Inject public  NamespacesServiceImpl(
            DatastoreHelper datastoreHelper);

}