当前位置: 首页>>代码示例>>C++>>正文


C++ Artifact::GetRepository方法代码示例

本文整理汇总了C++中Artifact::GetRepository方法的典型用法代码示例。如果您正苦于以下问题:C++ Artifact::GetRepository方法的具体用法?C++ Artifact::GetRepository怎么用?C++ Artifact::GetRepository使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Artifact的用法示例。


在下文中一共展示了Artifact::GetRepository方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PopulateWSDocMembersFromArtifact

void FacadeDocumentProviderImpl::PopulateWSDocMembersFromArtifact(Artifact artifact, WSDocNonCom& wsdoc)
{   
	std::tostringstream msg;
	msg << _T("The following artifact will be returned to Workshare:") << std::endl;
	msg << _T("Name:") << artifact.Name << std::endl;
	std::wstring id = EncodeWorkshareId(artifact.Id, artifact.VersionLabel, artifact.GetRepository().Id);
	msg << _T("Artifact Id:") << artifact.Id << std::endl;
	msg << _T("Artifact Version Label:") << artifact.VersionLabel << std::endl;
	msg << _T("Repository Id:") << artifact.GetRepository().Id << std::endl;
	msg << _T("Workshare Id:") << id << std::endl;
	msg << _T("Extension:") << artifact.FileExtension << std::endl;

	wsdoc.SetDescription(artifact.Name);
	wsdoc.SetDocId(id);
	wsdoc.SetExtension(artifact.FileExtension.c_str());
	CStdString sWorkingFile;
	try
	{
		sWorkingFile = artifact.WorkingFileName;
	}
	catch(...)
	{
		//dont worry if there is no working file just continue
	}
	if(sWorkingFile.IsEmpty())
	{
		wsdoc.SetModifiedTime(0);
		wsdoc.SetFileSizeLow(0);
		wsdoc.SetFileSizeHigh(0);
		msg << _T("Working File Name: <none>") << std::endl;
	}
	else
	{
		wsdoc.SetLocalFile(artifact.WorkingFileName);
		wsdoc.SetModifiedTime((DATE)artifact.ModifiedTime);
		wsdoc.SetFileSizeLow(artifact.FileSize);
		wsdoc.SetFileSizeHigh(0);
		msg << _T("Working File Name: ") << artifact.WorkingFileName << std::endl;
		msg << _T("File Size: ") << artifact.FileSize << std::endl;
		msg << _T("Modified Time: ") << artifact.ModifiedTime << std::endl;
	}
	msg << std::ends;
	LOG_WS_INFO(msg.str().c_str());
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:44,代码来源:FacadeDocumentProviderImpl.cpp

示例2: TranslateOdmaID

std::wstring FacadeDocumentProviderImpl::TranslateOdmaID(const std::wstring& id)
{
	std::wstring repositoryId, artifactId, artifactVersionLabel;
	bool supports = GetConnector().GetInfoFromOdmaId(id, repositoryId, artifactId, artifactVersionLabel);     
	if(supports)
	{
		// TODO: We do the following to ensure that we always have a fully qualified workshare id.
		// Some connectors may not include the version label for the most current document in the ODMA id
		Artifact artifact = GetConnector().GetRepositoryById(repositoryId).GetArtifactById(artifactId, artifactVersionLabel);
		return EncodeWorkshareId(artifact.Id, artifact.VersionLabel, artifact.GetRepository().Id);
	}
	else
		return L"";

}
开发者ID:killbug2004,项目名称:WSProf,代码行数:15,代码来源:FacadeDocumentProviderImpl.cpp

示例3: SelectDocumentEx

bool FacadeDocumentProviderImpl::SelectDocumentEx(LONG_PTR lHwnd, const std::wstring& formatString, const std::wstring& /*previousSelectedDocumentId*/, std::wstring& documentId)
{
	// TODO: We need a SelectArtifactVersion if previousSelectedDocumentId has something.
	LOG_WS_FUNCTION_SCOPE();

	Connector& connector = GetConnector();
	LOG_WS_INFO(L"Retrieved connector" );
	
	Artifact document = connector.SelectArtifact((HWND)lHwnd, formatString);
	if(document.IsNull())
	{
		LOG_WS_INFO(L"document == NULL" );
		return false;
	}

	documentId = EncodeWorkshareId(document.Id, document.VersionLabel, document.GetRepository().Id);	
	return true;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:18,代码来源:FacadeDocumentProviderImpl.cpp

示例4: SetDocumentToDelete

void DominoDocManager::SetDocumentToDelete(Artifact artifact)
{
   m_documentId = artifact.Id;
   m_versionLabel = artifact.VersionLabel;
   m_libraryUrl = artifact.GetRepository().Id;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:6,代码来源:DominoDocManager.cpp


注:本文中的Artifact::GetRepository方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。