Skip to main content

Posts

Showing posts from 2010

Get files / search files from Recycle Bin - SharePoint 2010

Couple of days back, I got a query. A organization has lots of document libraries & lists. And by mistake a user deleted a file from the document library. The administrator of the site collection is sure that the document is in the recycle bin, but cant find it. Recycle bin has thousands of items in it. The administrator knows the name of the file and he wants to restore it back to the original location. Microsoft doesn't provide search capabilities inside Recycle Bin. How will you find the specified file? How will you restore it back to the original place? Here is an answer... using PowerShell. Follow these steps... Step1. Run the below script to find out about the file in site collection recycle bin. (Get-SPSite "http://SERVERNAME:PORT/").RecycleBin | ?{$_.Title -match "DeletedFile"} If a matching file is found, Powershell will display information about the file. You will also be able to find who deleted it. Step 2. Now take the ID of th...

Site Migration using PowerShell - SharePoint 2010

      The content migration APIs provide a simple but flexible solution for migrating content between SharePoint Foundation Web sites. You can export the content from a SharePoint site, along with any dependencies (for example, security, roles, versioning, and other metadata), into single or multiple XML-formatted files called content migration packages. On import to the destination Web site, the packaged data is extracted and interpreted. You can also save the packages to a file server before migrating to a different server.   The object model is designed to work with data ranging from an entire Web site to an item in a list or library. You can select the level of metadata to include with migrated content, as well as choose whether to do a full migration or only an incremental change.   Following are some common scenarios for using the content migration APIs: Publishing content from a development server to a staging server and from a staging server to ...

OOAD & UML - Part 3. Identifying Classes - Class Diagram

The class diagram is the main building block in object oriented modeling. They are being used both for general conceptual modeling of the systematics of the application, and for detailed modeling translating the models into programming code. The classes in a class diagram represent both the main objects and or interactions in the application and the objects to be programmed. Identify classes from the use cases and sequence diagrams. Following are the 3 classifications of classes. 1. User Service Classes (Form level objects) 2. Business Service Classes (Control level objects) 3. Data Service Classes (Entity level objects) Below are some techniques for identifying classes. The first level is called as Analysis level classes. 1. 3 classes for each use case, 2. 1 class each for external actors, 3. 1 class each for alternate & exception flows. Now after these, we have to exclude classes on following rules... 1. Exclude classes which don'...

OOAD & UML - Part 2. Realizing Use Cases – Sequence Diagrams

We can also describe requirements in other ways. Use cases may contain secondary paths or alternative scenarios, which are variations on the main theme. Exceptions, or what happens when things go wrong at the system level, may also be described, not using the alternative paths section but in a section of their own. Alternative paths make use of the numbering of the basic course of events to show at which point they differ from the basic scenario, and, if appropriate, where they rejoin. 1. Alternate Path (Flow) 2. Pre Condition 3. Post Condition 4. Exception Flow. There are 3 major categories in sequence diagram. 1. Form Level – User Interface 2. Control Level – Business Logic 3. Entity Level – Data Interaction We will take Sign up to teach as a sample for demonstrating how to turn use cases into sequence diagram. This sequence diagram gives a rough idea to the end user (in our case its developers/managers) about the flow of the information. Use cases are generally not ...

SharePoint 2010 Web Content Management (WCM) Setting up deployment Paths & Jobs

Content deployment is a feature of Microsoft SharePoint Server 2010 that you can use to copy content from a source site collection to a destination site collection. Now that we have a authoring (publishing) site which is configured with custom master page, style sheet, site columns, content type and page layout, we have to configure content deployment paths and jobs which will transfer these artifacts to the production site. The content deployment jobs in Central Administration will also deploy pages (checked in & approved) created from the custom page layout to the destination site. 1. Branding – Master Page & Custom Style Sheet 2. Metadata – Site Columns & Content Types 3. Page Layouts 4. Setting up deployment Paths & Jobs Below we will walk through content deployment process beginning with creation of destination site. Step 1. We need to create destination (production) site. In MOSS days, one would create blank site as the productio...

SharePoint 2010 Web Content Management (WCM) Custom Page Layouts

For content publishing we need define how the content should look like. Otherwise each author would start adding content in his own way. And that would look very messy. For this we need to create layouts where we define what all information can be added. In our reference implementation, we will put Product Cover, Category, Price, Description and image. So the author will be able to add information only related to these fields. 1. Branding – Master Page & Custom Style Sheet 2. Metadata – Site Columns & Content Types 3. Page Layouts 4. Setting up deployment Paths & Jobs Below I have mentioned steps for creating custom page layout in VS 2010, associating custom content types and finally adding custom site columns to it. Step 1. Create a new module in the project. Rename the text file to ProductDetailsLayout.aspx. Step 2. Since we are creating publishing site, we will take blank web part page as base for this page layout. Open ~\ 14\TEM...

SharePoint 2010 Web Content Management (WCM) Metadata – Site Columns & Content Types

For creating a page layout we need to create a custom content type. And for creating a content type, we need to create custom site columns. Below I will demonstrate how to create custom site columns declaratively. 1. Branding – Master Page & Custom Style Sheet   2. Metadata – Site Columns & Content Types 3. Page Layouts 4. Setting up deployment Paths & Jobs Step 1. Add empty element to the project. In the elements.xml file you can declare the columns like below. Declarative site columns can also be defined in content type’s Elements.xml file. But for clarity, I have created a new element and declared the site columns in here…   Different types of site columns – Text, Choice, Number & Note. And finally for displaying image… I have created site columns of different types, Text, Choice, Number, Note and URL. For Choice (drop down list) column we can add choices in the tag provided. For displaying image, we can choose a URL column and set the f...

SharePoint 2010 Web Content Management (WCM)

SharePoint Server 2010 ships with a rich set of functionality for developing Web Content Management solutions. SharePoint 2010 is being bundled with a lot of new features and capabilities. In a typical Web Content Management scenario, there will be Authoring-Production or Authoring-Staging-Production environment setup. Where in all the content that is visible on the production site is actually added in authoring environment. The content then goes through approval process. Once approved, it will be pushed to the Staging or Production environment (Site). As part of a sample application, I am going to demonstrate one cycle of content management. This can be regarded as a WCM Reference Implementation. This demonstration will include 4 categories. 1. Branding – Master Page & Custom Style Sheet 2. Metadata – Site Columns & Content Types 3. Page Layouts 4. Setting up deployment Paths & Jobs 1. Branding – Master Page & Custom Style Sheet Branding is an impor...

Object Oriented Analysis & Design (OOAD) and Unified Modelling Language (UML)

Part 1 – Identifying Use Cases – Use Case Diagrams Recently I went through OOAD and UML training. The OOAD and UML tutorial was very impressive and I decided to share it with you. Object Oriented Analysis & Design and Unified Modelling Language is very important in a life cycle of a project. Previously I was involved in project requirement study and technical design. But this time, I learned the tricks of the trade. I discovered different tips for identifying Use Cases, Actors and Classes . In this series of posts, I am planning to take you through the process of involvement of UML in Requirement analysis and Design phase. This series will include 3 parts... Part 1. Identifying Use Cases – Use Case Diagrams Part 2. Realizing Use Cases – Sequence Diagrams Part 3. Identifying Classes – Class Diagrams For this purpose we will take commonly available sample requirement – Student Registration process. From this requirement we will identify the ACTORS and US...

Adding Custom Action in Central Administration

In my last post I had mentioned about custom actions locations and IDs. In this post you will see how to add a custom action to Central Administration's Application Management. For this we need to add 'Module' to VS 2010 SharePoint project. You can delete the text file which gets created by default when you create module. Now in the Elements.xml file add the below xml code. This will add a custom action under Web Applications which is under Application Management. You can see 'People Editor Settings' menu under Application Management->Web Applications - Vighnesh Bendre

Default Custom Action Locations and IDs

Following are the custom action Locations and IDs for SharePoint 2010. This list will help you in putting an application page or administration page in Central Administration (CA) or site settings. Location Custom Action Group ID Description Microsoft.SharePoint. Administration.Applications WebApplications Web Applications section under Application Management on Central Administration SiteCollections Site Collections section under Application Management on Central Administration Databases Databasessection under Application Management on Central Administration ServiceApplications ServiceApplications section under Application Management on Central Administration Microsoft.SharePoint. Administration.SystemSettings Servers Servers section under System Settings on Central Administration Email E-Mail and Text Messages (SMS) section under System Settings on Central Administration FarmManagement Farm Management section under System Settings on Central Administration Microsoft.SharePoint. Admin...