sitecore package 6.2 quick look at content - deployment

I know that you can create an xml file detailing the contents when you create a package, but is there an easy way to determine what is in a package when it is just a zip file sitting on a file server or something?
This is in version 6.2.

Yes you can. Open the Package Designer on the server where the zip is. In the New menu click the dropdown and select "From Existing." From here pick the package and it will open in the designer.
Here's a blog post visually showing you the idea: Inspecting Sitecore Packages Before You Install Them

You can open a package with any archive editor (for instance, 7zip). The main ZIP contains another ZIP, called package.zip. The package.zip in its turn contains a number of folder. The most interesting to you are probably:
files
items
security
The contents of /files folder corresponds to the file system structure under the website root. For instance:
/App_Config/Include/my.config
/bin/my.dll
/xsl/my.xsl
The contents of the /items folder is a directory structure. The path to an XML representation of each item starts with the folder named like the database holding the item, then down the path of the item in the content tree (starting from /sitecore), then the ID of the item, next the language, and finally the version. For instance:
\items\core\sitecore\layout\Layouts\my layout{GUID-GOES-HERE}\en\1\xml
"xml" is the name of the XML file containing the item data.
The contents of /security folder is simpler:
\security\roles\sitecore\My Power Users
There are other folders inside the package.zip, but those primarily hold the metadata of the package, like readme, license, etc.
I suppose it's a superfluous warning, but still: don't try to edit anything there. It makes sense for a quick look only to make sure something is or is not in the package.
Hope this helps.

Related

How to import UIAutomation files in PowerShell?

I am trying to import the UIAutomation files in PowerShell from this site
https://archive.codeplex.com/?p=uiautomation
But when I download there are no .dll files. How can I use programs such as Inspect.exe to automate the UI in PowerShell?
I am following steps from this site
https://www.softwaretestinghelp.com/desktop-application-ui-automation-with-powershell/
The downloaded zip contains 6 items, one among which is the releases folder. You'll find a releaseList.json file under it.
Now, the file isn't so clear but, let's say you want to use the file with .Net framework 4 and the release 0.8.7 Beta 3, just scroll down to the bottom, and under the ID: 44, you have 5 entries with the FileName as:
UIAutomation.0.8.7B3.NET35.zip
UIAutomation.0.8.7B3.NET40.zip
UIAutomation.0.8.7B3.for.ModernUI.zip
UIAutomation.0.8.7B3.sources.zip
UIAutomation.0.8.7B3.samples.zip
Decide which one you need as per your requirements - I selected UIAutomation.0.8.7B3.NET40.zip. Now, check its corresponding URL and that should tell you which file you need to look for.
For the one I used, the URL is: ./44/e1bf995a-f3c9-453d-88bc-0ff6d3509820, hence you'd need to go back to the releases folder and then browse for the folder labeled 44 and find the file named e1bf995a-f3c9-453d-88bc-0ff6d3509820.
Open the said file with a zip viewer and extract its content and here is where you find the UiAutomation.dll file. Use Import-Module with the path of the extracted files location and you should be good to go.

Where should I place the java properties file under netbeans

In my netbeans IDE I am creating one project.That project(Web Application) needs properties file.Since my application is having several packages.And all packages need to read this properties file in their code.So where should I place this java properties file.If I place the file out side of the packages that is under sourcepackages seperately,I am getting FilenotFound Exception.So where should I place it.
And one more doubt is if I want to change any content in the file in future where should I change the contents since it is present in Projects folder and under Files->build->classes folder also.From where should I modify it.From where the changes will be effected.
Please help.
Thank you.
Put your file under /src/resources/, then use it like below:
ResourceBundle props = ResourceBundle.getBundle("resources.config");
You may put this in any package. The point ist to read with
MyClass.getResourceAsStream("my.properties");
Read further here.
You always change in the project src folder. The build folder is only for building your app.
If you want to change the properties file on a deployed system you may put the properties into the WEB-INF folder and then access with ServletContext#getRealPath().
I put the .properties file in the same folder as the src and it works :)
Alright, so I'm working on Windows and here's my solution...
It actually doesn't matter much where you put the .properties file--but assuming you created the file in NetBeans and let it save to its default location, you can simply call the data with the full directory attached.
Just for reference, here's what I did:
SimpleDataSource sds = new SimpleDataSource("src\\simpledatasource\\mystuff.properties");
Notice you'll need to escape the backslash, so use two of them.

How do I edit files in place that were uploaded to Moodle?

I would like a better workflow for debugging uploaded SCOs. As things are, I must edit a file in the activity, repackage, upload, and test. Often, I just need to change a single line of code. It would be VERY nice to be able to edit that file, that line of code, on the server. So far, all I've found is that Moodle manages the files, so it seems impractical to locate and decipher the renamed files after upload.
Is there a way to configure Moodle so that it doesn't rename and relocated files in SCOs upon extraction? Actually, I'm open to any suggestions on the best, fastest workflow for debugging SCOs.
Problem background
Since Moodle 2.0, files are no longer stored on server in the conventional /this/is/the/path/to/my.file way. Instead, files are rehashed and stored in Repositories (i.e. spread all over the moodledata folder as a collection of seemingly random data). This increases security and cross-OS compatibility but complicates stuff for people who would like to simply upload a SCORM zip package via FTP. Here's more information on file handling in Moodle 2.0
Path to the soluton
Let's locate the file you want to update, then update it.
Run phpmyadmin, go to mdl_files table, find your file by name in the filename field (let's say it's portrait.jpg)
Look at the contenthash field, it'll look like abcde1234567890. This means your file is stored in moodledata/filedir/ab/cd/ folder under the name abcde1234567890.
Rename the updated portrait.jpg to abcde1234567890, upload and overwrite.
Go back to phpmyadmin and update the filesize field in record for portrait.jpg with the size of the updated file.
Obviously, this process can be automated. You'll have to write a script that allows you to upload a file, then it'll search for that file in mdl_files, save it to the correct folder and update all fields accordingly.
Alternative idea
Enable external package type (and also enable 'Update on every launch'). Go to Site administration / Plugins / Activities / SCORM and check the box down below. Now you'll be able to launch SCORM packages directly from another server, so Moodle won't mess with it. Of course, you can run in other (probably cross-domain related) problems.
Sergey's answer is very good, with one caveat:
In his example with the contenthash of abcde1234567890, the file is stored in the moodledata/filedir/ab/cd/ folder under the name abcde1234567890. Moodle uses the full contenthash to name the file.

How to create Eclipse EFS resources on the fly in a content provider?

I like to write a plugin for Eclipse, which allows to work with archive files as with normal file directories. For instance, if there is a zip file inside a project, the user should be able to view the contents of the zip file just by opening the zip folder. The user should be able e.g., to read text files in that archive.
I already created an EFS wrapper arround a particular archive format. Also, I created a new content-type for this archive format. I have a navigatorContent which is triggered on the content-type. In the content provider, currently I provide objects of type IFileStore. AFAIK there isn't any nice label provider shipped with eclipse for this types so I have to implement it on my own (there is one which is declared as private). However, this seems to be rather huge code duplication effort. What I therefore like to do is not to return IFileStore but IFile or IFolder instead so that the normal project explorer content provider can do its job. Is it possible at all to do something like this? If so, how can this practical be achieved?
Call IFolder.createLink() to create a new resource referencing a folder on your custom filesystem.
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2FresAdv_efs_resources.htm
This will create a new folder in your project, containing all files from ZIP archive. The problem, however is, that you will need to put it into an existing container, polluting resource tree.
Implementing ILabelProvider is not a huge effort at all, especially when compared to IFile or IFolder. If you extend BaseLabelprobivider you only need to implement 2 methods: getText() and getImage().

Trying to get along with Interwoven

I am to create a new design (CSS & HTML) for a web site which is created using Interwoven ContentCenter Professional.
Now, I can see the existing files in CMS (Interwoven) but, I can't make changes. My changes are displayed only when I'm in edit mode. Nothing in the live page. I tried to submit, create editions of files but still no good.
How should I create or edit pages in Interwoven CMS?
Thanks.
If you're talking about generic pages, then once you are finished you have to click on the Generate option, then choose a directory and click Finish. Last thing you should do is to choose yeswhen it asks you to Re-generate the page.
What you are trying to do is just creating a new file, not generating a file from TeamSite's Formpublisher. It is just like if you are in Windows Explorer and creating a new file. In order to generate a file from a form entry, you need to be in the templatedata directory, ex: /default/main/branch1/WORKAREA/wa1/templatedata/category/type(on unix) or Y:/default/main/branch1/WORKAREA/wa1/templatedata/category/type (on Windows). There should be a file call datacapture.cfg there. There is another directory called data under the above path which stores your data content record (dcr) that are created from the form. This is the file that you can use to generate which will use the (tpl) file under the presentation directory.