public static T ValidateAmbiguous <T>( T local, T path, T preconfigured, PathRegistryObjectType objectType, String name) { if (path != null && preconfigured != null) { throw new EPException( "The " + objectType.Name + " by name '" + name + "' is ambiguous as it exists in both the path space and the preconfigured space"); } if (local != null) { if (path != null || preconfigured != null) { // This should not happen as any create-XXX has checked whether if it already exists; handle it anyway throw new EPException( "The " + objectType.Name + " by name '" + name + "' is ambiguous as it exists in both the local space and the path or preconfigured space"); } return(local); } return(path != null ? path : preconfigured); }
public PathExceptionAmbiguous( string name, PathRegistryObjectType objectType) : base( objectType.Prefix + " " + objectType.Name + " by name '" + name + "' is exported by multiple modules") { }
private static EPUndeployPreconditionException MakeException( PathRegistryObjectType objectType, string name, string otherDeploymentId) { var objectName = objectType.Name; var firstUppercase = objectName.Substring(0, 1).ToUpperInvariant() + objectName.Substring(1); return(new EPUndeployPreconditionException( firstUppercase + " '" + name + "' cannot be un-deployed as it is referenced by deployment '" + otherDeploymentId + "'")); }
private static EPDeployPreconditionException MakePreconditionExceptionPreconfigured( int rolloutItemNumber, PathRegistryObjectType objectType, string name) { var message = "Required pre-configured "; message += objectType.Name + " '" + name + "'"; message += " cannot be found"; return(new EPDeployPreconditionException(message, rolloutItemNumber)); }
public static EPException MakePathAmbiguous( PathRegistryObjectType objectType, String name, PathException e) { return(new EPException( "The " + objectType.Name + " by name '" + name + "' is ambiguous as it exists for multiple modules: " + e.Message, e)); }
private static EPDeployPreconditionException MakePreconditionExceptionPath( int rolloutItemNumber, PathRegistryObjectType objectType, NameAndModule nameAndModule) { var message = "Required dependency "; message += objectType.Name + " '" + nameAndModule.Name + "'"; if (!string.IsNullOrEmpty(nameAndModule.ModuleName)) { message += " module '" + nameAndModule.ModuleName + "'"; } message += " cannot be found"; return(new EPDeployPreconditionException(message, rolloutItemNumber)); }
public PathExceptionInvalidVisibility(PathRegistryObjectType objectType) : base("Attempted to add non-path-visibility " + objectType) { }