#
mgaerber
here is a proposal for the split up CR:
ICoreService:
ISiteService:
IUserService:
IFileService:
TODO
ICoreService:
using System;
using System.Collections;
namespace Cuyahoga.Core.Service
{
/// Generic operations on persistent objects
public interface ICoreService
{
object GetObjectById(Type type, int id);
object GetObjectById(Type type, int id, bool allowNull);
object GetObjectByDescription(Type type, string propertyName, string description);
IList GetAll(Type type);
IList GetAll(Type type, params string[] sortProperties);
void SaveObject(object obj);
void UpdateObject(object obj);
void DeleteObject(object obj);
void MarkForDeletion(object obj);
//will following still be needed with NHibernate facility?
void ClearCache(Type type);
void ClearCollectionCache(string roleName);
void ClearQueryCache(string cacheRegion);
}
}ISiteService:
using System;
using System.Collections;
using Cuyahoga.Core.Domain;
namespace Cuyahoga.Core.Service
{
/// Common site operations
public interface ISiteService
{
//site
Site GetSiteBySiteUrl(string siteUrl);
SiteAlias GetSiteAliasByUrl(string url);
IList GetSiteAliasesBySite(Site site);
//node
IList GetRootNodes(Site site);
Node GetRootNodeByCultureAndSite(string culture, Site site);
Node GetNodeByShortDescriptionAndSite(string shortDescription, Site site);
IList GetNodesByTemplate(Template template);
void UpdateNode(Node node, bool propagatePermissionsToChildNodes, bool propagatePermissionsToSections);
void DeleteNode(Node node);
void PropagatePermissionsToChildNodes(Node parentNode, bool propagateToSections);
void PropagatePermissionsToSections(Node node);
//menu
IList GetMenusByRootNode(Node rootNode);
//section
IList GetSortedSectionsByNode(Node node);
IList GetUnconnectedSections();
IList GetTemplatesBySection(Section section);
//moduletype
IList GetSectionsByModuleTypes(IList moduleTypes);
}
}IUserService:
using System;
using System.Collections;
using Cuyahoga.Core.Domain;
namespace Cuyahoga.Core.Service
{
public interface IUserService
{
User GetUserByUsernameAndPassword(string username, string password);
User GetUserByUsernameAndEmail(string username, string email);
IList FindUsersByUsername(string searchString);
}
}IFileService:
TODO