Skip to content

Commit

Permalink
#4 Corrected AddIshBaseline.Tests.ps1 as NAME is not a minimal field …
Browse files Browse the repository at this point in the history
…according to 13.0.0 FieldSetup API call. Added couple of examples for Get-Help
  • Loading branch information
ddemeyer committed Nov 3, 2017
1 parent b5b9b82 commit f36e57e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Describe “Add-IshBaseline" -Tags "Create" {

Context Add-IshBaseline IshObjectsGroup" {
$baselineName = ($cmdletName + " " + (Get-Date -Format "yyyyMMddHHmmssfff") + " A")
$ishObjectA = Add-IshBaseline -IshSession $ishSession -Name $baselineName
$ishObjectA = Add-IshBaseline -IshSession $ishSession -Name $baselineName |
Get-IshBaseline -IshSession $ishSession -RequestedMetadata (Set-IshRequestedMetadataField -IshSession $ishSession -Name "NAME")
$baselineName = ($cmdletName + " " + (Get-Date -Format "yyyyMMddHHmmssfff") + " B")
$ishObjectB = Add-IshBaseline -IshSession $ishSession -Name $baselineName |
Get-IshBaseline -IshSession $ishSession -RequestedMetadata (Set-IshRequestedMetadataField -IshSession $ishSession -Name "NAME")
Expand All @@ -34,7 +35,8 @@ Describe “Add-IshBaseline" -Tags "Create" {
$ishObjectD = Add-IshBaseline -IshSession $ishSession -Name $baselineName |
Get-IshBaseline -IshSession $ishSession -RequestedMetadata (Set-IshRequestedMetadataField -IshSession $ishSession -Name "NAME")
$baselineName = ($cmdletName + " " + (Get-Date -Format "yyyyMMddHHmmssfff") + " E")
$ishObjectE = Add-IshBaseline -IshSession $ishSession -Name $baselineName
$ishObjectE = Add-IshBaseline -IshSession $ishSession -Name $baselineName |
Get-IshBaseline -IshSession $ishSession -RequestedMetadata (Set-IshRequestedMetadataField -IshSession $ishSession -Name "NAME")
$baselineName = ($cmdletName + " " + (Get-Date -Format "yyyyMMddHHmmssfff") + " F")
$ishObjectF = Add-IshBaseline -IshSession $ishSession -Name $baselineName |
Get-IshBaseline -IshSession $ishSession -RequestedMetadata (Set-IshRequestedMetadataField -IshSession $ishSession -Name "NAME")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ namespace Trisoft.ISHRemote.Cmdlets.DocumentObj
/// <para type="description">The Set-IshDocumentObj cmdlet updates the document objects that are passed through the pipeline or determined via provided parameters This commandlet allows to update all types of objects (Illustrations, Maps, etc. ), except for publication (outputs).
/// For publication (outputs) you need to use Set-IshPublicationOutput.</para>
/// </summary>
/// <example>
/// <code>
/// $ishSession = New-IshSession -WsBaseUrl $wsBaseUrl -PSCredential Admin
/// Get-IshDocumentObj -IshSession $ishSession -LogicalId ISHPUBLMODULECOMBINELANGUAGES |
/// Set-IshMetadataField -IshSession $ishSession -Name "FSTATUS" -Level "Lng" -ValueType "Element" -Value "VSTATUSTOBEREVIEWED" |
/// Set-IshDocumentObj -IshSession $ishSession |
/// Set-IshMetadataField -IshSession $ishSession -Name "FSTATUS" -Level "Lng" -ValueType "Element" -Value "VSTATUSRELEASED" |
/// Set-IshDocumentObj -IshSession $ishSession
/// </code>
/// <para>For all versions and languages retrieved, push them to status 'To Be Reviewed' and immediately to 'Release'. Note that also Find-IshDocumentObj or Get-IshFolderContent are ways to get to content objects.</para>
/// </example>
[Cmdlet(VerbsCommon.Set, "IshDocumentObj", SupportsShouldProcess = true)]
[OutputType(typeof(IshObject))]
public sealed class SetIshDocumentObj : DocumentObjCmdlet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ namespace Trisoft.ISHRemote.Cmdlets.Settings
/// Get-IshSetting -IshSession $ishSession -FieldName "FTRANSLATIONCONFIGURATION" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLWriteObjPluginConfig.xml"
/// Get-IshSetting -IshSession $ishSession -FieldName "FISHWRITEOBJPLUGINCFG" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLPublishPluginConfiguration.xml"
/// Get-IshSetting -IshSession $ishSession -FieldName "FISHPUBLISHPLUGINCONFIG" -FilePath $filePath
/// Write-Host "Done, see $settingsFolderPath"
/// </code>
/// <para>Retrieve all Settings xml configuration entries and save them in a folder to desk allowing file-to-file comparison with EnterViaUI folder.</para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,40 @@ namespace Trisoft.ISHRemote.Cmdlets.Settings
/// * A fieldname and a value, the value will be set for the given field
/// * A fieldname and a filepath, the value will be read from the file and set for the given field</para>
/// </summary>
/// <example>
/// <code>
/// Param(
/// $wsBaseUrl = 'https://example.com/InfoShareWS/',
/// $userName = 'admin',
/// $password = 'admin',
/// $settingsFolderPath = 'D:\temp'
/// )
/// $ishSession = New-IshSession -WsBaseUrl $wsBaseUrl -IshUserName $userName -IshPassword $password
/// Write-Verbose "Submitting Xml Settings from $settingsFolderPath"
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLInboxConfiguration.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FINBOXCONFIGURATION" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLBackgroundTaskConfiguration.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FISHBACKGROUNDTASKCONFIG" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLChangeTrackerConfig.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FISHCHANGETRACKERCONFIG" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLExtensionConfiguration.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FISHEXTENSIONCONFIG" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLPluginConfig.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FISHPLUGINCONFIGXML" -FilePath $filePath
/// # Version 13.0.0 requires a status to be present before status transitions can be confirmed
/// # Add-IshLovValue -IshSession $ishSession -LovId DSTATUS -Label "Translation In Review" -Description "Translation In Review"
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLStatusConfiguration.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FSTATECONFIGURATION" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLTranslationConfiguration.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FTRANSLATIONCONFIGURATION" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLWriteObjPluginConfig.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FISHWRITEOBJPLUGINCFG" -FilePath $filePath
/// $filePath = Join-Path -Path $settingsFolderPath -ChildPath "Admin.XMLPublishPluginConfiguration.xml"
/// Set-IshSetting -IshSession $ishSession -FieldName "FISHPUBLISHPLUGINCONFIG" -FilePath $filePath
/// Write-Host "Done"
/// </code>
/// <para>Submit all Xml Settings configuration entries from your prepared folder (or standard EnterViaUI folder).</para>
/// </example>
[Cmdlet(VerbsCommon.Set, "IshSetting", SupportsShouldProcess = true)]
[OutputType(typeof(IshFields))]
public sealed class SetIshSetting : SettingsCmdlet
Expand Down

0 comments on commit f36e57e

Please sign in to comment.