Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

124 lines
3.4 KiB

// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System;
using Squidex.Domain.Apps.Core;
using Squidex.Domain.Apps.Core.Assets;
using Squidex.Infrastructure;
namespace Squidex.Domain.Apps.Entities.Contents.TestData
{
public sealed class FakeUrlGenerator : IUrlGenerator
{
public bool CanGenerateAssetSourceUrl { get; } = true;
public string? AssetThumbnail(NamedId<DomainId> appId, string idOrSlug, AssetType assetType)
{
return $"assets/{appId.Name}/{idOrSlug}?width=100";
}
public string? AssetSource(NamedId<DomainId> appId, DomainId assetId, long fileVersion)
{
return $"assets/source/{assetId}";
}
public string AssetContent(NamedId<DomainId> appId, string idOrSlug)
{
return $"assets/{appId.Name}/{idOrSlug}";
}
public string ContentUI(NamedId<DomainId> appId, NamedId<DomainId> schemaId, DomainId contentId)
{
return $"contents/{schemaId.Name}/{contentId}";
}
public string AssetsUI(NamedId<DomainId> appId, string? query = null)
{
throw new NotSupportedException();
}
public string AssetContentBase()
{
throw new NotSupportedException();
}
public string AssetContentBase(string appName)
{
throw new NotSupportedException();
}
public string BackupsUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string ClientsUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string ContentsUI(NamedId<DomainId> appId, NamedId<DomainId> schemaId)
{
throw new NotSupportedException();
}
public string ContributorsUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string DashboardUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string LanguagesUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string PatternsUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string PlansUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string RolesUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string RulesUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string SchemasUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string SchemaUI(NamedId<DomainId> appId, NamedId<DomainId> schemaId)
{
throw new NotSupportedException();
}
public string WorkflowsUI(NamedId<DomainId> appId)
{
throw new NotSupportedException();
}
public string UI()
{
throw new NotSupportedException();
}
}
}