public bool InsertMarks(MarksDTO marksdto)
{
XmlSerializer serializer = new XmlSerializer(typeof(MarksDTO));
System.IO.MemoryStream stream = new System.IO.MemoryStream();
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
try
{
serializer.Serialize(stream, marksdto);
stream.Position = 0;
doc.Load(stream);
ExaminationBranchDAO examDAO = new ExaminationBranchDAO();
return examDAO.InsertStudentMarks(doc.InnerXml);
}
catch
{
throw;
}
finally
{
stream.Close();
stream.Dispose();
}
}
public bool InsertStudentMarks(string MarksXML)
{
object[] parameters = { MarksXML };
try
{
Int32 n = Convert.ToInt32(db.ExecuteScalar("usp_add_student_marks", parameters));
if (n > 0)
{
return true;
}
}
catch (System.Data.DataException exception)
{
ErrorHandler.WriteError(exception.Message, exception);
}
return false;
}
I, Me, Myself
Search
Tuesday, July 12, 2011
Tuesday, June 7, 2011
Error File
public static void WriteError(string errorMessage, Exception objException)
{
try
{
string path = "~/ErrorLogs/" + DateTime.Today.ToString("dd-mm-yy") + ".txt";
if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath(path)))
{
File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close();
}
using (StreamWriter w = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path)))
{
w.WriteLine("\r\n Error Logs : ");
string err = "An Unhandled Exception Occured in: " + System.Web.HttpContext.Current.Request.Url.ToString() + "\r\n" +
"\r\n Machine Name : " + Dns.GetHostName().ToString() + "\r\n" +
"\r\n Date : " + DateTime.Now.ToString(CultureInfo.InvariantCulture) + "\r\n" +
"\r\n Method Name : " + objException.TargetSite.Name.ToString() + "\r\n" +
"\r\n Error Message : " + objException.Message.ToString().Trim() + "\r\n" +
"\r\n Stack Trace : " + objException.StackTrace.ToString().Trim();
w.WriteLine(err);
w.WriteLine("^^-------------------------------------------------------------------^^");
w.Flush();
w.Close();
}
}
catch (Exception ex)
{
WriteError(ex.Message, ex);
}
}
{
try
{
string path = "~/ErrorLogs/" + DateTime.Today.ToString("dd-mm-yy") + ".txt";
if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath(path)))
{
File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close();
}
using (StreamWriter w = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path)))
{
w.WriteLine("\r\n Error Logs : ");
string err = "An Unhandled Exception Occured in: " + System.Web.HttpContext.Current.Request.Url.ToString() + "\r\n" +
"\r\n Machine Name : " + Dns.GetHostName().ToString() + "\r\n" +
"\r\n Date : " + DateTime.Now.ToString(CultureInfo.InvariantCulture) + "\r\n" +
"\r\n Method Name : " + objException.TargetSite.Name.ToString() + "\r\n" +
"\r\n Error Message : " + objException.Message.ToString().Trim() + "\r\n" +
"\r\n Stack Trace : " + objException.StackTrace.ToString().Trim();
w.WriteLine(err);
w.WriteLine("^^-------------------------------------------------------------------^^");
w.Flush();
w.Close();
}
}
catch (Exception ex)
{
WriteError(ex.Message, ex);
}
}
Making serilization
Category cat1 = new Category();
cat1.Available = true;
cat1.CategoryCode = "CatCode1";
cat1.CategoryID = Guid.NewGuid();
cat1.IsProgramLevel = true;
cat1.ParentCategoryID = Guid.NewGuid();
cat1.StringID = Guid.NewGuid();
cat1.CategoryName = new LocalizationEntity();
cat1.CategoryName.LocalizedString = "Cat Name1";
cat1.CategoryName.LocalizedStringID = cat1.StringID;
cat1.CategoryName.PlatformLanguageID = Guid.NewGuid();
cat1.CategoryName.LocalizedStringID = Guid.NewGuid();
string xmldataCat = SerializationHelper.Serialize(typeof(Category), cat1);
SerializationHelper.SerializeBOData(typeof(Category), @"d:\testcat.xml",cat1);
Category catNew = (Category)SerializationHelper.DeSerialize(typeof(Category), xmldataCat);
Category catnewFile = (Category)SerializationHelper.DeserializeXml(typeof(Category), @"d:\testcat.xml");
//CIPAttribute attr1 = new CIPAttribute();
//CIPAttribute attr2 = new CIPAttribute();
//ca.Attributes.Add(attr1);
//ca.Attributes.Add(attr2);
//ca.CIPCategory = cat1;
// string xmlData = SerializationHelper.Serialize(typeof(CategoryAttribute), ca);
cat1.Available = true;
cat1.CategoryCode = "CatCode1";
cat1.CategoryID = Guid.NewGuid();
cat1.IsProgramLevel = true;
cat1.ParentCategoryID = Guid.NewGuid();
cat1.StringID = Guid.NewGuid();
cat1.CategoryName = new LocalizationEntity();
cat1.CategoryName.LocalizedString = "Cat Name1";
cat1.CategoryName.LocalizedStringID = cat1.StringID;
cat1.CategoryName.PlatformLanguageID = Guid.NewGuid();
cat1.CategoryName.LocalizedStringID = Guid.NewGuid();
string xmldataCat = SerializationHelper.Serialize(typeof(Category), cat1);
SerializationHelper.SerializeBOData(typeof(Category), @"d:\testcat.xml",cat1);
Category catNew = (Category)SerializationHelper.DeSerialize(typeof(Category), xmldataCat);
Category catnewFile = (Category)SerializationHelper.DeserializeXml(typeof(Category), @"d:\testcat.xml");
//CIPAttribute attr1 = new CIPAttribute();
//CIPAttribute attr2 = new CIPAttribute();
//ca.Attributes.Add(attr1);
//ca.Attributes.Add(attr2);
//ca.CIPCategory = cat1;
// string xmlData = SerializationHelper.Serialize(typeof(CategoryAttribute), ca);
Serilization
public class SerializationHelper
{
///
/// Method to Serialize Object
///
///
Object Entity Type
/// seralization object
///Inner XML Data
public static string Serialize(Type entityType, object seralizationObject)
{
string resultXML = string.Empty;
System.IO.MemoryStream stream = new System.IO.MemoryStream();
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
try
{
XmlSerializer xmlSerializer = new XmlSerializer(entityType);
xmlSerializer.Serialize(stream, seralizationObject);
if (stream != null)
{
stream.Position = 0;
doc.Load(stream);
resultXML = doc.InnerXml;
}
}
catch
{
return string.Empty;
}
return resultXML;
}
///
/// Method to DeSerialize XMl to Object
///
/// Object Entity Type
/// Inner XML Data
///DeSerialized Object
public static object DeSerialize(Type entityType, string xmlData)
{
object result = null;
try
{
XmlSerializer xmlSerializer = new XmlSerializer(entityType);
using (TextReader tr = new StringReader(xmlData))
{
result = xmlSerializer.Deserialize(tr);
}
}
catch
{
return null;
}
return result;
}
public static void SerializeBOData(Type type, string xmlFile, object obj)
{
TextWriter textWriter = null;
try
{
XmlSerializer xmlSerializer = new XmlSerializer(type);
// Writing the file requires a StreamWriter.
textWriter = new StreamWriter(xmlFile);
// Serialize the BOData to xml.
if (textWriter != null)
{
xmlSerializer.Serialize(textWriter, obj);
}
}
catch (Exception ex)
{
// Log the exception.
}
finally
{
if (textWriter != null)
{
textWriter.Close();
}
}
}
public static object DeserializeXml(Type boDataType, string xmlFile)
{
TextReader textReader = null;
try
{
if (!System.IO.File.Exists(xmlFile))
{
return null;
}
XmlSerializer xmlSer = new XmlSerializer(boDataType);
// Read the XML.
textReader = new StreamReader(xmlFile);
// Cast the deserialized xml to the type of BOData.
return xmlSer.Deserialize(textReader);
}
catch (Exception ex)
{
// Propogate the exception.
}
finally
{
if (textReader != null)
{
textReader.Close();
textReader = null;
}
}
// Return the data transfer object.
return null;
}
}
{
///
/// Method to Serialize Object
///
///
Object Entity Type
/// seralization object
///
public static string Serialize(Type entityType, object seralizationObject)
{
string resultXML = string.Empty;
System.IO.MemoryStream stream = new System.IO.MemoryStream();
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
try
{
XmlSerializer xmlSerializer = new XmlSerializer(entityType);
xmlSerializer.Serialize(stream, seralizationObject);
if (stream != null)
{
stream.Position = 0;
doc.Load(stream);
resultXML = doc.InnerXml;
}
}
catch
{
return string.Empty;
}
return resultXML;
}
///
/// Method to DeSerialize XMl to Object
///
/// Object Entity Type
/// Inner XML Data
///
public static object DeSerialize(Type entityType, string xmlData)
{
object result = null;
try
{
XmlSerializer xmlSerializer = new XmlSerializer(entityType);
using (TextReader tr = new StringReader(xmlData))
{
result = xmlSerializer.Deserialize(tr);
}
}
catch
{
return null;
}
return result;
}
public static void SerializeBOData(Type type, string xmlFile, object obj)
{
TextWriter textWriter = null;
try
{
XmlSerializer xmlSerializer = new XmlSerializer(type);
// Writing the file requires a StreamWriter.
textWriter = new StreamWriter(xmlFile);
// Serialize the BOData to xml.
if (textWriter != null)
{
xmlSerializer.Serialize(textWriter, obj);
}
}
catch (Exception ex)
{
// Log the exception.
}
finally
{
if (textWriter != null)
{
textWriter.Close();
}
}
}
public static object DeserializeXml(Type boDataType, string xmlFile)
{
TextReader textReader = null;
try
{
if (!System.IO.File.Exists(xmlFile))
{
return null;
}
XmlSerializer xmlSer = new XmlSerializer(boDataType);
// Read the XML.
textReader = new StreamReader(xmlFile);
// Cast the deserialized xml to the type of BOData.
return xmlSer.Deserialize(textReader);
}
catch (Exception ex)
{
// Propogate the exception.
}
finally
{
if (textReader != null)
{
textReader.Close();
textReader = null;
}
}
// Return the data transfer object.
return null;
}
}
XML Sqlquery
USE [CIPDB]
GO
/****** Object: StoredProcedure [dbo].[uspAddProgramCategory] Script Date: 02/08/2011 18:44:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[upsAddProgramCategory]
(
/* Serialized DataXML*/
@xmlData XML
)
AS
/* Try Statement Begins */
/*BEGIN TRY
BEGIN TRANSACTION */
/* This Insert Statement populates a CIPProgram Table*/
DECLARE @xmlPointer INT -- Pointer variable
EXEC sp_xml_preparedocument @xmlPointer OUTPUT,
@xmlData -- Get XML document into memory
DECLARE @ProgramID uniqueidentifier
DECLARE @CategoryID uniqueidentifier
DECLARE @err AS INT
BEGIN TRY
BEGIN TRANSACTION
INSERT INTO dbo.LocalizationMaster
(
StringID
)
SELECT
StringID
FROM OPENXML (@xmlPointer,'/ProgramCategory',1)
WITH(StringID uniqueidentifier 'StringID')
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured',16,1)
RETURN @err
END
SELECT @ProgramID = ProgramID ,@CategoryID = CategoryID
FROM OPENXML (@xmlPointer,'/ProgramCategory',1)
WITH(
ProgramID uniqueidentifier 'ProgramID',
CategoryID uniqueidentifier 'CategoryAttribute/CategoryID'
)
Print '1'
INSERT INTO ProgramCategory
(
[ProgramID],
[CategoryID],
[StringID],
[DefaultLanguageID]
)
SELECT
ProgramID,
CategoryID,
StringID,
'cca5bd8d-172f-4687-9d58-607f0b235192'
FROM OPENXML (@xmlPointer,'/ProgramCategory',1)
WITH(
ProgramID uniqueidentifier 'ProgramID',
CategoryID uniqueidentifier 'CategoryAttribute/CategoryID',
StringID uniqueidentifier 'StringID'
)
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding the Program',16,1)
RETURN @err
END
Print '2'
INSERT INTO LocalizedString
(
[LocalizedStringID],
[PlatformLanguageID],
[LocalizedString],
[StringID]
)
SELECT
LocalizedStringID,
PlatformLanguageID,
LocalizedString,
StringID
FROM OPENXML (@xmlPointer,'/ProgramCategory/ProgramCategoryName',1)
WITH(
LocalizedStringID uniqueidentifier 'LocalizedStringID',
PlatformLanguageID uniqueidentifier 'PlatformLanguageID',
StringID uniqueidentifier 'StringID',
LocalizedString varchar(max) 'LocalizedString'
)
Print '3'
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding LocalizedString',16,1)
RETURN @err
END
SELECT
AttributeID,
StringID,
DefaultLanguageID,
Required,
LocalizedStringID,
PlatformLanguageID,
LocalizedString
INTO #AttributeDetails
FROM OPENXML (@xmlPointer,'/ProgramCategory/Attributes/Attribute',1)
WITH(
AttributeID uniqueidentifier 'AttributeID',
StringID uniqueidentifier 'StringID',
DefaultLanguageID uniqueidentifier 'DefaultLanguageID',
Required bit 'Available',
LocalizedStringID uniqueidentifier 'ProgramAttributeName/LocalizedStringID',
PlatformLanguageID uniqueidentifier 'ProgramAttributeName/PlatformLanguageID',
LocalizedString varchar(max) 'ProgramAttributeName/LocalizedString'
)
Print '4'
INSERT INTO dbo.LocalizationMaster
(
StringID
)
SELECT #AttributeDetails.StringID
FROM #AttributeDetails
Print '5'
select * from #AttributeDetails
SELECT
@ProgramID,
categoryAttribute.CategoryAttributeID,
--#AttributeDetails.ProgramCategoryAttributeID,
#AttributeDetails.Required,
#AttributeDetails.StringID
FROM #AttributeDetails , CategoryAttribute categoryAttribute
WHERE categoryAttribute.AttributeID = #AttributeDetails.AttributeID
AND categoryAttribute.CategoryID = @CategoryID
INSERT INTO ProgramCategoryAttribute(
ProgramID,
CategoryAttributeID,
Required,
StringID)
SELECT
@ProgramID,
categoryAttribute.CategoryAttributeID,
#AttributeDetails.Required,
#AttributeDetails.StringID
FROM #AttributeDetails , CategoryAttribute categoryAttribute
WHERE categoryAttribute.AttributeID = #AttributeDetails.AttributeID
AND categoryAttribute.CategoryID = @CategoryID
Print '6'
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding to ProgramCategoryAttribute',16,1)
RETURN @err
END
Print '7'
INSERT INTO LocalizedString
(
[LocalizedStringID],
[PlatformLanguageID],
[LocalizedString],
[StringID]
)
SELECT
#AttributeDetails.LocalizedStringID,
#AttributeDetails.PlatformLanguageID,
#AttributeDetails.LocalizedString,
#AttributeDetails.StringID
FROM #AttributeDetails
Print '8'
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding to ProgramCategoryAttribute',16,1)
RETURN @err
END
COMMIT TRANSACTION
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('Caught exception An error occured',16,1)
RETURN @err
END
END TRY
/* Catch Begins */
BEGIN CATCH
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('Caught exception An error occured',16,1)
RETURN @err
END
/* Catch Ends */
END CATCH
GO
/****** Object: StoredProcedure [dbo].[uspAddProgramCategory] Script Date: 02/08/2011 18:44:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[upsAddProgramCategory]
(
/* Serialized DataXML*/
@xmlData XML
)
AS
/* Try Statement Begins */
/*BEGIN TRY
BEGIN TRANSACTION */
/* This Insert Statement populates a CIPProgram Table*/
DECLARE @xmlPointer INT -- Pointer variable
EXEC sp_xml_preparedocument @xmlPointer OUTPUT,
@xmlData -- Get XML document into memory
DECLARE @ProgramID uniqueidentifier
DECLARE @CategoryID uniqueidentifier
DECLARE @err AS INT
BEGIN TRY
BEGIN TRANSACTION
INSERT INTO dbo.LocalizationMaster
(
StringID
)
SELECT
StringID
FROM OPENXML (@xmlPointer,'/ProgramCategory',1)
WITH(StringID uniqueidentifier 'StringID')
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured',16,1)
RETURN @err
END
SELECT @ProgramID = ProgramID ,@CategoryID = CategoryID
FROM OPENXML (@xmlPointer,'/ProgramCategory',1)
WITH(
ProgramID uniqueidentifier 'ProgramID',
CategoryID uniqueidentifier 'CategoryAttribute/CategoryID'
)
Print '1'
INSERT INTO ProgramCategory
(
[ProgramID],
[CategoryID],
[StringID],
[DefaultLanguageID]
)
SELECT
ProgramID,
CategoryID,
StringID,
'cca5bd8d-172f-4687-9d58-607f0b235192'
FROM OPENXML (@xmlPointer,'/ProgramCategory',1)
WITH(
ProgramID uniqueidentifier 'ProgramID',
CategoryID uniqueidentifier 'CategoryAttribute/CategoryID',
StringID uniqueidentifier 'StringID'
)
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding the Program',16,1)
RETURN @err
END
Print '2'
INSERT INTO LocalizedString
(
[LocalizedStringID],
[PlatformLanguageID],
[LocalizedString],
[StringID]
)
SELECT
LocalizedStringID,
PlatformLanguageID,
LocalizedString,
StringID
FROM OPENXML (@xmlPointer,'/ProgramCategory/ProgramCategoryName',1)
WITH(
LocalizedStringID uniqueidentifier 'LocalizedStringID',
PlatformLanguageID uniqueidentifier 'PlatformLanguageID',
StringID uniqueidentifier 'StringID',
LocalizedString varchar(max) 'LocalizedString'
)
Print '3'
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding LocalizedString',16,1)
RETURN @err
END
SELECT
AttributeID,
StringID,
DefaultLanguageID,
Required,
LocalizedStringID,
PlatformLanguageID,
LocalizedString
INTO #AttributeDetails
FROM OPENXML (@xmlPointer,'/ProgramCategory/Attributes/Attribute',1)
WITH(
AttributeID uniqueidentifier 'AttributeID',
StringID uniqueidentifier 'StringID',
DefaultLanguageID uniqueidentifier 'DefaultLanguageID',
Required bit 'Available',
LocalizedStringID uniqueidentifier 'ProgramAttributeName/LocalizedStringID',
PlatformLanguageID uniqueidentifier 'ProgramAttributeName/PlatformLanguageID',
LocalizedString varchar(max) 'ProgramAttributeName/LocalizedString'
)
Print '4'
INSERT INTO dbo.LocalizationMaster
(
StringID
)
SELECT #AttributeDetails.StringID
FROM #AttributeDetails
Print '5'
select * from #AttributeDetails
SELECT
@ProgramID,
categoryAttribute.CategoryAttributeID,
--#AttributeDetails.ProgramCategoryAttributeID,
#AttributeDetails.Required,
#AttributeDetails.StringID
FROM #AttributeDetails , CategoryAttribute categoryAttribute
WHERE categoryAttribute.AttributeID = #AttributeDetails.AttributeID
AND categoryAttribute.CategoryID = @CategoryID
INSERT INTO ProgramCategoryAttribute(
ProgramID,
CategoryAttributeID,
Required,
StringID)
SELECT
@ProgramID,
categoryAttribute.CategoryAttributeID,
#AttributeDetails.Required,
#AttributeDetails.StringID
FROM #AttributeDetails , CategoryAttribute categoryAttribute
WHERE categoryAttribute.AttributeID = #AttributeDetails.AttributeID
AND categoryAttribute.CategoryID = @CategoryID
Print '6'
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding to ProgramCategoryAttribute',16,1)
RETURN @err
END
Print '7'
INSERT INTO LocalizedString
(
[LocalizedStringID],
[PlatformLanguageID],
[LocalizedString],
[StringID]
)
SELECT
#AttributeDetails.LocalizedStringID,
#AttributeDetails.PlatformLanguageID,
#AttributeDetails.LocalizedString,
#AttributeDetails.StringID
FROM #AttributeDetails
Print '8'
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('An error occured while adding to ProgramCategoryAttribute',16,1)
RETURN @err
END
COMMIT TRANSACTION
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('Caught exception An error occured',16,1)
RETURN @err
END
END TRY
/* Catch Begins */
BEGIN CATCH
SELECT @err = @@error
IF @err <> 0
BEGIN
ROLLBACK TRANSACTION
RAISERROR ('Caught exception An error occured',16,1)
RETURN @err
END
/* Catch Ends */
END CATCH
Deployer Service
public class Deployer : IDeployer
{
public Deployer()
{
}
public bool Deploy(DeploymentManifest dto, BODataDeployInformation boDeployInfo, DeploymentComponentType deployComponentType)
{
bool status = false;
string logFilePath = System.IO.Path.Combine(boDeployInfo.ExecutableDirectory, Constants.CDF_ERROR_LOG_FILE);
if (logFilePath != string.Empty)
{
logFilePath = logFilePath.Replace(Constants.CDF_CLIENT_FOLDER_NAME, Constants.CDF_AGENT_FOLDER_NAME);
}
Logger.InitializeLogger(logFilePath);
switch (deployComponentType)
{
case DeploymentComponentType.Solution:
SolutionDeployer solutionDeployer = new SolutionDeployer(dto as Solution, boDeployInfo);
status = solutionDeployer.Deploy();
break;
case DeploymentComponentType.Site:
SiteDeployer siteDeployer = new SiteDeployer(dto as Site, boDeployInfo);
status = siteDeployer.Deploy();
break;
case DeploymentComponentType.SiteTemplate:
SiteTemplateDeployer siteTemplateDeployer = new SiteTemplateDeployer(dto as SiteTemplate, boDeployInfo);
status = siteTemplateDeployer.Deploy();
break;
case DeploymentComponentType.DeploymentManisfestList:
DeploymentManifestListDeployer listDeployer = new DeploymentManifestListDeployer(dto as DeploymentManifestList, boDeployInfo);
status = listDeployer.Deploy();
break;
case DeploymentComponentType.ListTemplate:
ListTemplateDeployer listTemplateDeployer = new ListTemplateDeployer(dto as ListTemplate, boDeployInfo);
status = listTemplateDeployer.Deploy();
break;
case DeploymentComponentType.ProfileProperty:
ProfilePropertyDeployer profilePropertyDeployer = new ProfilePropertyDeployer(dto as ProfileProperty);
status = profilePropertyDeployer.Deploy();
break;
case DeploymentComponentType.ManagedProperty:
ManagedMetadataPropertyDeployer managedPropertyDeployer = new ManagedMetadataPropertyDeployer(dto as ManagedProperty);
status = managedPropertyDeployer.Deploy();
break;
case DeploymentComponentType.StsAdmCommand:
ICommand commandStsAdm = CommandHandler.GetCommand(CommandType.StsAdmCommand, boDeployInfo);
status = commandStsAdm.Execute(dto as Microsoft.Spo.Cdf.BusinessObjects.StsAdmCommand);
break;
case DeploymentComponentType.PowerShellCommand:
ICommand commandPS = CommandHandler.GetCommand(CommandType.PowerShellCommand, boDeployInfo);
status = commandPS.Execute(dto as Microsoft.Spo.Cdf.BusinessObjects.PowerShellCommand);
break;
}
return status;
}
public bool UploadDeploymentBit(BODataDeployInformation boDeployInfo, DeployComponent component)
{
bool uploadBitStatus = true;
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
BackupSPSite backupHandler = new BackupSPSite(boDeployInfo);
uploadBitStatus = backupHandler.UploadDeploymentBit(new DeployComponent(Constants.CDF_AGGREGATE_MANIFEST_XML,
string.Empty,
DeploymentComponentType.AggregateOperation));
return uploadBitStatus;
}
public bool UploadDeploymentBits(BODataDeployInformation boDeployInfo, DeploymentComponents components)
{
bool uploadBitStatus = true;
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
BackupSPSite backupHandler = new BackupSPSite(boDeployInfo);
uploadBitStatus = backupHandler.UploadDeploymentBits(components);
return uploadBitStatus;
}
public bool DownloadDataBits(BODataDeployInformation deployInformation, DeployComponent component)
{
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
IDataManager dataDownload = DeployDataManager.Create(DataOperationType.FarmDataOperation);
bool downloadBitsStatus = (bool)dataDownload.GetData(deployInformation, component);
return downloadBitsStatus;
}
public bool CreateSPTimerJob(BODataDeployInformation deployInfo)
{
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
if (deployInfo.ExecutableDirectory != string.Empty)
{
deployInfo.ExecutableDirectory = agentPath; //setting Agent installed path
}
Assembly assembly = Assembly.Load(Constants.TIMERJOB_ASSEMBLY_NAME);
if (assembly == null)
{
throw new Exception(string.Format("Failed to load assembly '{0}'", Constants.TIMERJOB_ASSEMBLY_NAME));
}
System.Type type = assembly.GetType(Constants.TIMERJOB_TIMER_FULLYQUALIFIED_CLASS);
if (null == type)
{
throw new Exception(string.Format("Failed to load type '{0}'", Constants.TIMERJOB_TIMER_FULLYQUALIFIED_CLASS));
}
try
{
IDeploymentTimer deploymentTimer = Activator.CreateInstance(type) as IDeploymentTimer;
deploymentTimer.Create(deployInfo);
}
catch (Exception ex)
{
CDFException ex1 = new CDFException(ex.Message);
throw new FaultException(ex1);
Logger.WriteLog(ex, CDFEventType.Error, DeploymentComponentType.TimerJob);
}
finally
{
}
//SPTimerJob spTimerJob = new SPTimerJob();
//return spTimerJob.Create(deployInfo);
return true;
}
public void TranferCafPackageFile(CAFPackageFile packageFile)
{
try
{
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
if (packageFile.CDFExecutableDirectory != string.Empty)
{
packageFile.CDFExecutableDirectory = agentPath;
}
Logger.InitializeLogger(logFilePath);
string cabFilePath = packageFile.CDFRunDirectory;
string destinationFilePath = string.Empty;
if (!System.IO.Directory.Exists(packageFile.CDFRunDirectory))
System.IO.Directory.CreateDirectory(packageFile.CDFRunDirectory);
//constrct the CabFilePath in CDF RunDirectory and CR Number
if (packageFile.ChangeRequestNumber != string.Empty)
cabFilePath = System.IO.Path.Combine(cabFilePath, packageFile.ChangeRequestNumber);
// create output folder, if does not exist -- Change request number
if (!System.IO.Directory.Exists(cabFilePath))
System.IO.Directory.CreateDirectory(cabFilePath);
if (packageFile.CAFPackageName.Contains(Constants.CDF_AGGREGATE_MANIFEST_XML))
{
// create output folder, if does not exist -- Solution Artifacts
cabFilePath = System.IO.Path.Combine(cabFilePath, Constants.CDF_PACKAGE_FOLDER_NAME);
if (!System.IO.Directory.Exists(cabFilePath))
{
System.IO.Directory.CreateDirectory(cabFilePath);
}
}
destinationFilePath = cabFilePath;
// delete the CAB file if it is already exists
cabFilePath = System.IO.Path.Combine(cabFilePath, packageFile.CAFPackageName);
if (System.IO.File.Exists(cabFilePath))
{
System.IO.File.Delete(cabFilePath);
}
int chunkSize = 2048;
byte[] buffer = new byte[chunkSize];
using (System.IO.FileStream writeStream = new System.IO.FileStream(cabFilePath, System.IO.FileMode.CreateNew, System.IO.FileAccess.Write))
{
try
{
do
{
// read bytes from input stream
int bytesRead = packageFile.FileByteStream.Read(buffer, 0, chunkSize);
if (bytesRead == 0) break;
// write bytes to output stream
writeStream.Write(buffer, 0, bytesRead);
} while (true);
}
catch (Exception ex)
{
Logger.WriteLog(ex, CDFEventType.Error, DeploymentComponentType.CABFileTransfer);
}
finally
{
if (writeStream != null)
{
writeStream.Close();
}
}
}
if (packageFile.CAFPackageName == Constants.CAF_PACKAGE_NAME)
{
FileIO.ExtractUploadedPackagedFile(cabFilePath, destinationFilePath, packageFile.CDFExecutableDirectory);
}
//return true;
}
catch (Exception ex)
{
Logger.WriteLog(ex, CDFEventType.Error, DeploymentComponentType.CABFileTransfer);
//return false;
}
}
}
{
public Deployer()
{
}
public bool Deploy(DeploymentManifest dto, BODataDeployInformation boDeployInfo, DeploymentComponentType deployComponentType)
{
bool status = false;
string logFilePath = System.IO.Path.Combine(boDeployInfo.ExecutableDirectory, Constants.CDF_ERROR_LOG_FILE);
if (logFilePath != string.Empty)
{
logFilePath = logFilePath.Replace(Constants.CDF_CLIENT_FOLDER_NAME, Constants.CDF_AGENT_FOLDER_NAME);
}
Logger.InitializeLogger(logFilePath);
switch (deployComponentType)
{
case DeploymentComponentType.Solution:
SolutionDeployer solutionDeployer = new SolutionDeployer(dto as Solution, boDeployInfo);
status = solutionDeployer.Deploy();
break;
case DeploymentComponentType.Site:
SiteDeployer siteDeployer = new SiteDeployer(dto as Site, boDeployInfo);
status = siteDeployer.Deploy();
break;
case DeploymentComponentType.SiteTemplate:
SiteTemplateDeployer siteTemplateDeployer = new SiteTemplateDeployer(dto as SiteTemplate, boDeployInfo);
status = siteTemplateDeployer.Deploy();
break;
case DeploymentComponentType.DeploymentManisfestList:
DeploymentManifestListDeployer listDeployer = new DeploymentManifestListDeployer(dto as DeploymentManifestList, boDeployInfo);
status = listDeployer.Deploy();
break;
case DeploymentComponentType.ListTemplate:
ListTemplateDeployer listTemplateDeployer = new ListTemplateDeployer(dto as ListTemplate, boDeployInfo);
status = listTemplateDeployer.Deploy();
break;
case DeploymentComponentType.ProfileProperty:
ProfilePropertyDeployer profilePropertyDeployer = new ProfilePropertyDeployer(dto as ProfileProperty);
status = profilePropertyDeployer.Deploy();
break;
case DeploymentComponentType.ManagedProperty:
ManagedMetadataPropertyDeployer managedPropertyDeployer = new ManagedMetadataPropertyDeployer(dto as ManagedProperty);
status = managedPropertyDeployer.Deploy();
break;
case DeploymentComponentType.StsAdmCommand:
ICommand commandStsAdm = CommandHandler.GetCommand(CommandType.StsAdmCommand, boDeployInfo);
status = commandStsAdm.Execute(dto as Microsoft.Spo.Cdf.BusinessObjects.StsAdmCommand);
break;
case DeploymentComponentType.PowerShellCommand:
ICommand commandPS = CommandHandler.GetCommand(CommandType.PowerShellCommand, boDeployInfo);
status = commandPS.Execute(dto as Microsoft.Spo.Cdf.BusinessObjects.PowerShellCommand);
break;
}
return status;
}
public bool UploadDeploymentBit(BODataDeployInformation boDeployInfo, DeployComponent component)
{
bool uploadBitStatus = true;
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
BackupSPSite backupHandler = new BackupSPSite(boDeployInfo);
uploadBitStatus = backupHandler.UploadDeploymentBit(new DeployComponent(Constants.CDF_AGGREGATE_MANIFEST_XML,
string.Empty,
DeploymentComponentType.AggregateOperation));
return uploadBitStatus;
}
public bool UploadDeploymentBits(BODataDeployInformation boDeployInfo, DeploymentComponents components)
{
bool uploadBitStatus = true;
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
BackupSPSite backupHandler = new BackupSPSite(boDeployInfo);
uploadBitStatus = backupHandler.UploadDeploymentBits(components);
return uploadBitStatus;
}
public bool DownloadDataBits(BODataDeployInformation deployInformation, DeployComponent component)
{
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
IDataManager dataDownload = DeployDataManager.Create(DataOperationType.FarmDataOperation);
bool downloadBitsStatus = (bool)dataDownload.GetData(deployInformation, component);
return downloadBitsStatus;
}
public bool CreateSPTimerJob(BODataDeployInformation deployInfo)
{
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
Logger.InitializeLogger(logFilePath);
if (deployInfo.ExecutableDirectory != string.Empty)
{
deployInfo.ExecutableDirectory = agentPath; //setting Agent installed path
}
Assembly assembly = Assembly.Load(Constants.TIMERJOB_ASSEMBLY_NAME);
if (assembly == null)
{
throw new Exception(string.Format("Failed to load assembly '{0}'", Constants.TIMERJOB_ASSEMBLY_NAME));
}
System.Type type = assembly.GetType(Constants.TIMERJOB_TIMER_FULLYQUALIFIED_CLASS);
if (null == type)
{
throw new Exception(string.Format("Failed to load type '{0}'", Constants.TIMERJOB_TIMER_FULLYQUALIFIED_CLASS));
}
try
{
IDeploymentTimer deploymentTimer = Activator.CreateInstance(type) as IDeploymentTimer;
deploymentTimer.Create(deployInfo);
}
catch (Exception ex)
{
CDFException ex1 = new CDFException(ex.Message);
throw new FaultException
Logger.WriteLog(ex, CDFEventType.Error, DeploymentComponentType.TimerJob);
}
finally
{
}
//SPTimerJob spTimerJob = new SPTimerJob();
//return spTimerJob.Create(deployInfo);
return true;
}
public void TranferCafPackageFile(CAFPackageFile packageFile)
{
try
{
String agentPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
agentPath = System.IO.Path.GetDirectoryName(agentPath);
string logFilePath = System.IO.Path.Combine(agentPath, Constants.CDF_ERROR_LOG_FILE);
if (packageFile.CDFExecutableDirectory != string.Empty)
{
packageFile.CDFExecutableDirectory = agentPath;
}
Logger.InitializeLogger(logFilePath);
string cabFilePath = packageFile.CDFRunDirectory;
string destinationFilePath = string.Empty;
if (!System.IO.Directory.Exists(packageFile.CDFRunDirectory))
System.IO.Directory.CreateDirectory(packageFile.CDFRunDirectory);
//constrct the CabFilePath in CDF RunDirectory and CR Number
if (packageFile.ChangeRequestNumber != string.Empty)
cabFilePath = System.IO.Path.Combine(cabFilePath, packageFile.ChangeRequestNumber);
// create output folder, if does not exist -- Change request number
if (!System.IO.Directory.Exists(cabFilePath))
System.IO.Directory.CreateDirectory(cabFilePath);
if (packageFile.CAFPackageName.Contains(Constants.CDF_AGGREGATE_MANIFEST_XML))
{
// create output folder, if does not exist -- Solution Artifacts
cabFilePath = System.IO.Path.Combine(cabFilePath, Constants.CDF_PACKAGE_FOLDER_NAME);
if (!System.IO.Directory.Exists(cabFilePath))
{
System.IO.Directory.CreateDirectory(cabFilePath);
}
}
destinationFilePath = cabFilePath;
// delete the CAB file if it is already exists
cabFilePath = System.IO.Path.Combine(cabFilePath, packageFile.CAFPackageName);
if (System.IO.File.Exists(cabFilePath))
{
System.IO.File.Delete(cabFilePath);
}
int chunkSize = 2048;
byte[] buffer = new byte[chunkSize];
using (System.IO.FileStream writeStream = new System.IO.FileStream(cabFilePath, System.IO.FileMode.CreateNew, System.IO.FileAccess.Write))
{
try
{
do
{
// read bytes from input stream
int bytesRead = packageFile.FileByteStream.Read(buffer, 0, chunkSize);
if (bytesRead == 0) break;
// write bytes to output stream
writeStream.Write(buffer, 0, bytesRead);
} while (true);
}
catch (Exception ex)
{
Logger.WriteLog(ex, CDFEventType.Error, DeploymentComponentType.CABFileTransfer);
}
finally
{
if (writeStream != null)
{
writeStream.Close();
}
}
}
if (packageFile.CAFPackageName == Constants.CAF_PACKAGE_NAME)
{
FileIO.ExtractUploadedPackagedFile(cabFilePath, destinationFilePath, packageFile.CDFExecutableDirectory);
}
//return true;
}
catch (Exception ex)
{
Logger.WriteLog(ex, CDFEventType.Error, DeploymentComponentType.CABFileTransfer);
//return false;
}
}
}
Tuesday, April 19, 2011
Saturday, December 4, 2010
Telangana History
Andhra Pradesh consists of three distinct regions, namely, Andhra, Rayalaseema and Talangana. Andhra and Rayalaseema were part of Madras province of the British empire. For approximately 400 years, Telangana was part of Hyderabad State, an independent kingdom ruled by Muslim Qutub Shahi and Nizam dynasties.
The history of Telengana began with the spread of Aryan civilization into this region. Early settlements in this region according to Buddhist works were along the banks of river Godavari in continuation with Mulaka around Paithan in Aurangabad district of Maharashtra and Asmaka with Podana or Bodan as capital. Bodan was a sacred place according to Jaina literature. There were many local chieftains or kings in this region in the historic period and they came under the rule of Mauryan Empire. It is only after Asoka the concept of sovereignty came to be known in this area. Asoka introduced a highly organized system of administration based on the concept of central authority. It took two more centuries for Telugu people to unite under the leadership of Chimuka the first ruler of Satavahana dynasty. The first major dynasty to rule the region was the Stavahana. Before the Satavahanas, there were many local rulers in different parts of Telengana such as Gobada, Narana, Kamvayasa, Sirivayasa and Samagopa. Samagopa ruled a large area for very long time. He issued a variety of coins of different denominations and in different metals. His rule was followed by that of Chimuka and coins with counter struck marks confirm this fact. All these local kings ruled from Kotalingala and early rulers of the Satavahana dynasty also ruled from here.
The Satavahana rule commenced around 30 BC and it spread far wide. There were great kings like Satakarni I, Pulumavi I, Hala, Gautamiputra Satakarni, Yajana Satakarni etc who by virtue of their political conquests, efforts to promote trade and commerce and patronage of arts left a rich legacy of their rule. It was during this period, the famous Buddhist stupas at Amaravati, Battiprolu, Gudivada, Pedda Ganjam, Dhulikatta, Kondapur in Andhra and cave temples at Karla, Nasik, in the Maharastra and great stupa at Sanchi in Malva were built. The rule is believed to have received royal patronage from Yajana Satakarni. The Satavahana rule ended in 230 AD. The large number of Satavahana coins found in various parts of Decan bear testimony to the enormous trade activity during their period. This includes trade with Roman Empire in the beginning of Christian era, which earned large quantities of gold in exchange for cotton, pepper, ivory, aromatics and precious stones. It is interesting to recall that Magavahana dynasty ruled north coastal Andhra when Satavahasnas were ruling Telengana and Vidarba.
The Satavahanas were followed by Vakatakas and Sakas of the Kardamaka family in the upper Deccan, the Ikshvakus in the Krishna valley and Chutus in the karanataka region. It seems that that northern Telengana was included in the Vakartaka kingdom until the arrival of Vishnukundins. The Ikshvaku rule in the Krishna valley was marked by hectic activities of the Buddhist missionaries. It is worth noting that during the post Satavahna period, the whole of Andhra Pradesh and particularly coastal tract was dotted with Buddhist stupas. Andhra desa became the center for the growth of Mahayana Buddhism and during this period trade contacts also developed with Burma, Malaya, Cambodia, Indonesia, Japan etc. It was again during this period distinctive Andhra art and architecture developed and this can be viewed in art galleries of Amaravati in Chennai and London. Andhra region became the center for Mahayana Buddhism, which propounded the madhyamika theory of Sunyavada School, which produced books on logic and philosophy. Sri Lanka was influenced by these contacts with Andhra, which is evident in their script and in the language. In the latter half of the fourth century AD, the Vishnukundins in Telegana and Pallavas in southern Andhra rose to power. Vishnukundin Madhavavarman was a great conqueror who brought much of the Decan lying to the north of Krishna under his rule. Their rule continued until the last quarter of the sixth century. Their copper coins were unique and had a core of iron, a metal that was not used again for making coins until 1980’s. Their contemporaries in southern Andhra were Pallavas and their founder was Virakurcha who was a subordinate under Satavahanas. An early member of this family Vishnu Gopa witnessed the invasion of Samudra Gupta in 370AD. The Gupta invasion of south was not to occupy land and subjugate kings but to revive Brahmanism. Sanskrit replaced the Prakrit language introduced by Buddhist missionaries. Thus started the decline of Buddhism from 5th century onwards in Andhra. Construction of temples for the gods and goddesses of the Puranic cult and celebration of Hindu festivals continued thereafter. These major changes brought about an integrated socio-religions culture in Andhra, which dominated all spheres of social life.
The beginning of the seventh century is another landmark in the Andhra history. Politically leaving the Pallava rule in the south the rest of Andhra Desa was brought under the rule of Pulakesi II of Badami Chalukyas. Having acquired a vast empire Pulakesi II conferred on his younger brother Kubja Vishnu Vardana the real authority over Vengi territory of Andhra and retained Rayalaseema and Telengana under his direct rule. Thus, coastal Andhra became the kingdom of the Vengi Chalukyas and remained so until the advent of Kakatiyas. There were many great rulers of this dynasty such as Jayasimha Vallabha I, Vijayaditya II, Raja Raja Narendra and Kulattunga I. The latter also ascended Chola throne after marrying Chola emperor’s daughter Ammanga Devi, Under Badami Chalukyas Saivism spread and the temple at Alampuram, Mahanadi, Satyavolu etc were built.
The Badami Chaulukyas were overthrown by Rashtrakkutas in 750 AD. A subordinate family was named by historians as Chalukyas of Bodhan or Vemulavada ruled over northern Telengana for two centuries. Arikesari II (930-955 AD) was a powerful king and was a patron of men of letters. The renowned Kannada poet Pampa and Jinavallabha were in his court. Vikramarjunavijaya, the great Kannada work was written at Vemulawada. During Rashrakuta rule many Jain centers flourished like Kolanupaka, Bairanpally etc.
During the period between 600-1000AD Rayalaseema area was ruled by Telugu Choda, Banas, Vaidumbas and other chiefs. In the history of Andhradesa 978 AD is another landmark, Chalukyas of Kalyani ousted the Rashtrakutas. During the later part of Chalukya local chiefs or petty mandaliks rule Andhra desa and especially in the 12th century, there was no effective central authority.
After 1156 AD, the Chalukyan power at Kalyani was overthrown by Bijjala. Kakatiyas gained superiority over other subordinates of Chalukyas in Telengana. They did not yield to Bijjala. Kakatiya Rudradeva proclaimed his independence in 1163 AD. Thus started Kakatiya rule from Orugallu. Their rule extended form Telengana to coastal region and in the south unto Kanchi. This was perhaps for the first time after Satavahana rule, that major part of Telugu speaking people were brought under one political authority. The Kalinga part of Andhra was continuosly under the rule of Eastern Gangas. During the rule of Ganga King Ananthavarma Choda Ganga (1076-1148) famous temple at Mukhalingam, Narayanapuram, Simhachalam, Bhuvaneshvar, Puri and Konarak were built. Art flourished during the rule of Ganga kings. Kakatiya Ganapatideva introduced uniform administration throughout his kingdom. Foreign trade flourished during Kakatiya rule. Motupalli near Chirala was a major port in those days, which was visited by Venecian traveler Marco Polo. Temple building was other important activity during this period. Several monuments of the times were at Pillalamarri, Palampet, Hanumakonda and Warangal fort that bear testimony to the artistic skills of artisans. The fall of Kakatiyas led to political turmoil. Some local chiefs formed a confederacy under the leadership of Kapaya nayaka and expelled Musilms form Warangal. Two separate kingdom, one by Reddy Chief Prolaya Vema in the coastal region with Kondavidu as capital and other by Velama chief Anapota Nayudu in Telengana were founded. They survived the onslaughts of Bahmanis for over hundred years and during that time great achievements in Telugu literature and culture occurred. The famous Telugu poets of the period were Srinatha, Errapradaga and Pothana. Vijayanagara and Gajapati rulers conquered the Reddy kingdom while Velama kingdom succumbed to Muslims.
The Decan in the middle of the fouteenth century was politically bisected roughly along the river Krishna, the north occupied by the Bahmanis and the south by Vijayanagara. This lasted unto 1565 AD, which marked the fall of Vijayanagara after the battle of Rakshasha Tangadi, Gajapati rulers of Orissa ruled the coastal Andhra. In 1515 AD, Qutub Shahi kingdom started with Golconda as capital. Aurangajeb defeated Qutub shahis in 1687 AD starting Mughal authority. In 1724 AD, Asaf Jahi rule commenced under Nizamulmulk but his successors lost vast areas to the East India Company and subsequently to the British. Telengana alone of Andhradesa remained with the Hyderabad state. Asaf Jahi rule ended in 1948 AD after police action. Andhra state formed in 1953 and Andhra Pradesh in 1956.
The history of Telengana began with the spread of Aryan civilization into this region. Early settlements in this region according to Buddhist works were along the banks of river Godavari in continuation with Mulaka around Paithan in Aurangabad district of Maharashtra and Asmaka with Podana or Bodan as capital. Bodan was a sacred place according to Jaina literature. There were many local chieftains or kings in this region in the historic period and they came under the rule of Mauryan Empire. It is only after Asoka the concept of sovereignty came to be known in this area. Asoka introduced a highly organized system of administration based on the concept of central authority. It took two more centuries for Telugu people to unite under the leadership of Chimuka the first ruler of Satavahana dynasty. The first major dynasty to rule the region was the Stavahana. Before the Satavahanas, there were many local rulers in different parts of Telengana such as Gobada, Narana, Kamvayasa, Sirivayasa and Samagopa. Samagopa ruled a large area for very long time. He issued a variety of coins of different denominations and in different metals. His rule was followed by that of Chimuka and coins with counter struck marks confirm this fact. All these local kings ruled from Kotalingala and early rulers of the Satavahana dynasty also ruled from here.
The Satavahana rule commenced around 30 BC and it spread far wide. There were great kings like Satakarni I, Pulumavi I, Hala, Gautamiputra Satakarni, Yajana Satakarni etc who by virtue of their political conquests, efforts to promote trade and commerce and patronage of arts left a rich legacy of their rule. It was during this period, the famous Buddhist stupas at Amaravati, Battiprolu, Gudivada, Pedda Ganjam, Dhulikatta, Kondapur in Andhra and cave temples at Karla, Nasik, in the Maharastra and great stupa at Sanchi in Malva were built. The rule is believed to have received royal patronage from Yajana Satakarni. The Satavahana rule ended in 230 AD. The large number of Satavahana coins found in various parts of Decan bear testimony to the enormous trade activity during their period. This includes trade with Roman Empire in the beginning of Christian era, which earned large quantities of gold in exchange for cotton, pepper, ivory, aromatics and precious stones. It is interesting to recall that Magavahana dynasty ruled north coastal Andhra when Satavahasnas were ruling Telengana and Vidarba.
The Satavahanas were followed by Vakatakas and Sakas of the Kardamaka family in the upper Deccan, the Ikshvakus in the Krishna valley and Chutus in the karanataka region. It seems that that northern Telengana was included in the Vakartaka kingdom until the arrival of Vishnukundins. The Ikshvaku rule in the Krishna valley was marked by hectic activities of the Buddhist missionaries. It is worth noting that during the post Satavahna period, the whole of Andhra Pradesh and particularly coastal tract was dotted with Buddhist stupas. Andhra desa became the center for the growth of Mahayana Buddhism and during this period trade contacts also developed with Burma, Malaya, Cambodia, Indonesia, Japan etc. It was again during this period distinctive Andhra art and architecture developed and this can be viewed in art galleries of Amaravati in Chennai and London. Andhra region became the center for Mahayana Buddhism, which propounded the madhyamika theory of Sunyavada School, which produced books on logic and philosophy. Sri Lanka was influenced by these contacts with Andhra, which is evident in their script and in the language. In the latter half of the fourth century AD, the Vishnukundins in Telegana and Pallavas in southern Andhra rose to power. Vishnukundin Madhavavarman was a great conqueror who brought much of the Decan lying to the north of Krishna under his rule. Their rule continued until the last quarter of the sixth century. Their copper coins were unique and had a core of iron, a metal that was not used again for making coins until 1980’s. Their contemporaries in southern Andhra were Pallavas and their founder was Virakurcha who was a subordinate under Satavahanas. An early member of this family Vishnu Gopa witnessed the invasion of Samudra Gupta in 370AD. The Gupta invasion of south was not to occupy land and subjugate kings but to revive Brahmanism. Sanskrit replaced the Prakrit language introduced by Buddhist missionaries. Thus started the decline of Buddhism from 5th century onwards in Andhra. Construction of temples for the gods and goddesses of the Puranic cult and celebration of Hindu festivals continued thereafter. These major changes brought about an integrated socio-religions culture in Andhra, which dominated all spheres of social life.
The beginning of the seventh century is another landmark in the Andhra history. Politically leaving the Pallava rule in the south the rest of Andhra Desa was brought under the rule of Pulakesi II of Badami Chalukyas. Having acquired a vast empire Pulakesi II conferred on his younger brother Kubja Vishnu Vardana the real authority over Vengi territory of Andhra and retained Rayalaseema and Telengana under his direct rule. Thus, coastal Andhra became the kingdom of the Vengi Chalukyas and remained so until the advent of Kakatiyas. There were many great rulers of this dynasty such as Jayasimha Vallabha I, Vijayaditya II, Raja Raja Narendra and Kulattunga I. The latter also ascended Chola throne after marrying Chola emperor’s daughter Ammanga Devi, Under Badami Chalukyas Saivism spread and the temple at Alampuram, Mahanadi, Satyavolu etc were built.
The Badami Chaulukyas were overthrown by Rashtrakkutas in 750 AD. A subordinate family was named by historians as Chalukyas of Bodhan or Vemulavada ruled over northern Telengana for two centuries. Arikesari II (930-955 AD) was a powerful king and was a patron of men of letters. The renowned Kannada poet Pampa and Jinavallabha were in his court. Vikramarjunavijaya, the great Kannada work was written at Vemulawada. During Rashrakuta rule many Jain centers flourished like Kolanupaka, Bairanpally etc.
During the period between 600-1000AD Rayalaseema area was ruled by Telugu Choda, Banas, Vaidumbas and other chiefs. In the history of Andhradesa 978 AD is another landmark, Chalukyas of Kalyani ousted the Rashtrakutas. During the later part of Chalukya local chiefs or petty mandaliks rule Andhra desa and especially in the 12th century, there was no effective central authority.
After 1156 AD, the Chalukyan power at Kalyani was overthrown by Bijjala. Kakatiyas gained superiority over other subordinates of Chalukyas in Telengana. They did not yield to Bijjala. Kakatiya Rudradeva proclaimed his independence in 1163 AD. Thus started Kakatiya rule from Orugallu. Their rule extended form Telengana to coastal region and in the south unto Kanchi. This was perhaps for the first time after Satavahana rule, that major part of Telugu speaking people were brought under one political authority. The Kalinga part of Andhra was continuosly under the rule of Eastern Gangas. During the rule of Ganga King Ananthavarma Choda Ganga (1076-1148) famous temple at Mukhalingam, Narayanapuram, Simhachalam, Bhuvaneshvar, Puri and Konarak were built. Art flourished during the rule of Ganga kings. Kakatiya Ganapatideva introduced uniform administration throughout his kingdom. Foreign trade flourished during Kakatiya rule. Motupalli near Chirala was a major port in those days, which was visited by Venecian traveler Marco Polo. Temple building was other important activity during this period. Several monuments of the times were at Pillalamarri, Palampet, Hanumakonda and Warangal fort that bear testimony to the artistic skills of artisans. The fall of Kakatiyas led to political turmoil. Some local chiefs formed a confederacy under the leadership of Kapaya nayaka and expelled Musilms form Warangal. Two separate kingdom, one by Reddy Chief Prolaya Vema in the coastal region with Kondavidu as capital and other by Velama chief Anapota Nayudu in Telengana were founded. They survived the onslaughts of Bahmanis for over hundred years and during that time great achievements in Telugu literature and culture occurred. The famous Telugu poets of the period were Srinatha, Errapradaga and Pothana. Vijayanagara and Gajapati rulers conquered the Reddy kingdom while Velama kingdom succumbed to Muslims.
The Decan in the middle of the fouteenth century was politically bisected roughly along the river Krishna, the north occupied by the Bahmanis and the south by Vijayanagara. This lasted unto 1565 AD, which marked the fall of Vijayanagara after the battle of Rakshasha Tangadi, Gajapati rulers of Orissa ruled the coastal Andhra. In 1515 AD, Qutub Shahi kingdom started with Golconda as capital. Aurangajeb defeated Qutub shahis in 1687 AD starting Mughal authority. In 1724 AD, Asaf Jahi rule commenced under Nizamulmulk but his successors lost vast areas to the East India Company and subsequently to the British. Telengana alone of Andhradesa remained with the Hyderabad state. Asaf Jahi rule ended in 1948 AD after police action. Andhra state formed in 1953 and Andhra Pradesh in 1956.
Monday, November 15, 2010
Wednesday, November 10, 2010
Telangana Endhuku Kavali ?
Telangana Endhuku Kavali Ante
E prantha varikina e pradeshaniki kina first kavalisindhi aa prantham aa pradesh bagundalani
varu baguna tharvathene evarina
Reasons
1.1947 India Independence ,1948 Telangana Independence from Nizams
around 500 years Telangana anedhi separate Country ga undhi India ki kuda elanti sambandham ledhu Mana Telangana Tho
2.1948 lo TELANGANA India lo Merge ayindhi okkapadu INDIA ki 200 crores appu ichina ganatha mana telangana ku undhi
3.1953 Oct 1st Andhra(now Andhra Region &Seema Region) Madras ninchi 123 kalisi unna tharvatha separate state ga erpadadhi
4.E Andhra Rastram Erapdataniki Pottisriramulu 50 rojulu NiraharDiksha Chesadu dhani Palithame A Andhra Rastram
5. Kani E vokka Roju Andhra & Seema vallu Pottisriramula Thayga Phalanni Gurthu Chesukuntu aa roju Jarupukoru
6. Evvani Endhukante
Oka Telangana Vadu First vadi Prantham Gurinchi Thelusukovali
Kani E text books lonu Nizam Edhirinchi poradi Telangana Vimukthi kaligidhani ,Telangana Rastram 1948 sep 17th lo erpadidhani dhini kosam prana thayagulu Chesina varini Eppudu E text Books lo cheppaledhu
Ikkada Mosam Start ayindhi
A prana thayagalu chesina varili maa thathalu unanru vallanu eppudu memu thaluchukoleka poyam valla photo laku dhandalu pettaleka poyam ikkada maa history ki mosam jarigindhi
7.1953 lo Andhra Rastram Erpadaga Akkada kanisam oka jilla parishath pettukovataniki kuda Infrastructure ledhu vanarulu levu
valla drushti Hyderabad pina padindhi Telugu mataldutham ani okke okka reason tho Mana tho Merge Chepinchukonnaru appudu ikkad prajalaku amayakulu
8.aithe Idhi Conditional Ga Merge aindhi ekkadina Amayaka Prajalu undi Pushakalanga vanarulu unnappudu adhi first vallake chendhali ani
appudu pedha manashula oppandham prakaram Konni Conditions pettaru..
Kani E vokka roju aa conditions implement kaledhu
Inka Mosam choodandri
1.E okka sari Telangana Vadu CM ga 5 yrs Leru
2.PV NaraSimha Rao Shavanni Purthi ga kalakundane vadilesaru
3.Tank Band Pina Hyderabad Ratram(TELANGANA) kosam thayagam Chesina vari Vigrham Lekapovdam Ante valla intlo valla photo leka povdam
4.Nagarjuna Sagar Nalgonda lo undhi Akkad vallaku manchi neeru radhu kani Krishna District Manchi neeru veluthundhi Dhaniki thodu Floriad vyadhi
5.Manuguru lo Sanction aina Power Plant Vijaywada ku vellindhi Manuguru coal unadhi vijayawada lo adhi ledhu mari enhuku poindhi sanction aina tharvatha kuda
6.42% percent reservation anedhi Pedha manashula oppandham unnadhi intha varaku okka sector lo implement kaledhu mosam ikkada jarigindhi
7.APPSC exam lo Mana telangna vallaku thakkuva marks(written ekkuva marks vachina) vesi 2 category jobs ke parimitham chesi na ganath seema valladhi
8.Singareni antene telangana ikkada first Telangana vallaku jobs (80%) local Reservation (indian Constitution Rule) prakaram ivvali kani intha okka sari kuda idhi implement avvaledhu mosam ikkada jarigindhi
9.Telugu Thalli Telugu Thalli Antunaru Andhra and Seema Region ekkada okka vigrham undadhu
Telangana lo petti mosam chesthunaru
10.Ring Road Compenstion lo TG venkatesh ki Banjara Hills lo Place icharu kani Telangana vadiki chethulu dhooliparu thakkuva rate icharu
11.Lagadapati LANCO Hills Muslim Minorities dhi Adhi KABJA chesadu Manikonda prajalu valla shmashanam lo shavalu kala bettalante Lagadapati permission kavli endhukante adhi kuda occupy chesadu
Tuesday, September 28, 2010
Sunday, July 18, 2010
APCPDCL-2010 Exam Paper as per my memory
1.what will happen if reactive power is less than minimum value?
2.velocity error is which response?
3.IGBT is having both the properties
a.BJT and MOSFET
4.Field Effect Transistor acts as a ________?
5. SCR is Combination of
a. pn and pn junction b.pnp and pn junction c. pnp and npn junction d. pnp and np junction
6.why we use dc series motor in urban/suburban traction system ?
a. high starting torque b.with stand fluctuated loads c.high efficiency d. none of the above
7.accelaration 6km/hr in 30 secs free running 20 mins deceleration 6km/hr 30 secs
is for which traction system ?
8.Alternator is connected to bus bur prime mover is short circuited alternator acts as a
9.which motor having good power factor
a. capacitor startor b.capcitor run c. capacitor run and start d.shaded pole motor
10. what is the disadvantage of shaded pole motors
11.Common Emitter Transistor is a__________
12.If character equation having different signs the system is
13.when we apply Regenarative brakes
14.In CRO X-plate input is square wave Y-plate input is traingle wave what is the output
15. what is the use of blanker block in CRO
16.In Anderson Bridge for measuring the quantities by using unknown and known quantities of
a.Resistance b.Inductor c.Resistance and Inductor d.R L C
17.For Measurement of Capacitance which bridge we use ?
18.Some times we use Over Rated AC motors in some applications
a. high efficiency ,low pf b. high efficiency ,high pf c.low efficiency ,low pf d.low and low pf and eff
19.Over Current relay used in
a.T/M lines b.Distribution lines c.Alternators D.Medium T/m Lines
20.LVDT is a ?
21.Ia0=1.8,Ia1=2.0,Ia2=1.5 amps what is the fault if values of currents is given
a. LG fault b.LLG fault C.LLfault d. 3phase fault
22.In Differential Compound Motor Series ckt is short circuited what it results
a.Speed Decrease b.Speed Increase c. remains Same d. None of the above
23.In full -load copper and Iron losses are given what will happened copper and iron losses if load half-full load
24.For a constant flux T/F operating at 1000 rpm and 100 volts 50 Hz is speed is changed to New value 1200 rpm what is the new value of Voltage
25.Chopper Ton =100 and Toff=150 for protection of over voltage and over current
26. what is the phase shift of Common Emitter Transistor
27. In Step and Ramp responses what is the steady state errors
28. what is the condition of state space theory in both time and frequency domains
29.Half,semi,Full,Dual Convertor voltage values match the fallowing
30.what is the use of reheater in Thermal Power Plant
31. where is the surge tank placed in Hydro power plants.
32. which plant we used as peck load power plant
a.hydro b.nuclear c. thermal d. Diesel
33.In Butt Welding what will happen if Subject thickness is incresed
a. voltage and current increased b. v and i Decreased C. V constant I increased D. V and I Constant
34.3 phase induction squirrel cage ,3phase Slip Ring,Single Phase IM,Synchronous there starting methods
35.In DC shunt motor Series Resistance is short Circuited what will happen
36.How to we reduce magnetic hum in T/Fs
37.Treedoys are used for ?
38.A 400/220 Volts T/F P.U impdence is reffered to HV side is 0.1 P.u if we refer to LV what is impedence value
39.What is advantage the advantage of 3 phase over single phase
40.Gate Realizations
41.what is the max regulation of IMotors
42.What is The Efficiency of modern thermal power plants
43.If SurgeImpdence is terminated what will happen in T/M lines
44.what will happen if receiving end is open circuited
45.If system having 3 Asymptotes how many poles and zeros that system have
2.velocity error is which response?
3.IGBT is having both the properties
a.BJT and MOSFET
4.Field Effect Transistor acts as a ________?
5. SCR is Combination of
a. pn and pn junction b.pnp and pn junction c. pnp and npn junction d. pnp and np junction
6.why we use dc series motor in urban/suburban traction system ?
a. high starting torque b.with stand fluctuated loads c.high efficiency d. none of the above
7.accelaration 6km/hr in 30 secs free running 20 mins deceleration 6km/hr 30 secs
is for which traction system ?
8.Alternator is connected to bus bur prime mover is short circuited alternator acts as a
9.which motor having good power factor
a. capacitor startor b.capcitor run c. capacitor run and start d.shaded pole motor
10. what is the disadvantage of shaded pole motors
11.Common Emitter Transistor is a__________
12.If character equation having different signs the system is
13.when we apply Regenarative brakes
14.In CRO X-plate input is square wave Y-plate input is traingle wave what is the output
15. what is the use of blanker block in CRO
16.In Anderson Bridge for measuring the quantities by using unknown and known quantities of
a.Resistance b.Inductor c.Resistance and Inductor d.R L C
17.For Measurement of Capacitance which bridge we use ?
18.Some times we use Over Rated AC motors in some applications
a. high efficiency ,low pf b. high efficiency ,high pf c.low efficiency ,low pf d.low and low pf and eff
19.Over Current relay used in
a.T/M lines b.Distribution lines c.Alternators D.Medium T/m Lines
20.LVDT is a ?
21.Ia0=1.8,Ia1=2.0,Ia2=1.5 amps what is the fault if values of currents is given
a. LG fault b.LLG fault C.LLfault d. 3phase fault
22.In Differential Compound Motor Series ckt is short circuited what it results
a.Speed Decrease b.Speed Increase c. remains Same d. None of the above
23.In full -load copper and Iron losses are given what will happened copper and iron losses if load half-full load
24.For a constant flux T/F operating at 1000 rpm and 100 volts 50 Hz is speed is changed to New value 1200 rpm what is the new value of Voltage
25.Chopper Ton =100 and Toff=150 for protection of over voltage and over current
26. what is the phase shift of Common Emitter Transistor
27. In Step and Ramp responses what is the steady state errors
28. what is the condition of state space theory in both time and frequency domains
29.Half,semi,Full,Dual Convertor voltage values match the fallowing
30.what is the use of reheater in Thermal Power Plant
31. where is the surge tank placed in Hydro power plants.
32. which plant we used as peck load power plant
a.hydro b.nuclear c. thermal d. Diesel
33.In Butt Welding what will happen if Subject thickness is incresed
a. voltage and current increased b. v and i Decreased C. V constant I increased D. V and I Constant
34.3 phase induction squirrel cage ,3phase Slip Ring,Single Phase IM,Synchronous there starting methods
35.In DC shunt motor Series Resistance is short Circuited what will happen
36.How to we reduce magnetic hum in T/Fs
37.Treedoys are used for ?
38.A 400/220 Volts T/F P.U impdence is reffered to HV side is 0.1 P.u if we refer to LV what is impedence value
39.What is advantage the advantage of 3 phase over single phase
40.Gate Realizations
41.what is the max regulation of IMotors
42.What is The Efficiency of modern thermal power plants
43.If SurgeImpdence is terminated what will happen in T/M lines
44.what will happen if receiving end is open circuited
45.If system having 3 Asymptotes how many poles and zeros that system have
Subscribe to:
Posts (Atom)














